Heavy turnout of voters was witnessed in Nandyal rural and Gospadu mandals in the segment with women outnumbering men, sources said.
In Nandyal town, about 70 per cent polling was reported.
Barring a face-off between supporters of the TDP and YSRC at a couple of places, the by-election passed off peacefully, a senior police official said.
The counting of votes will be taken up on August 28.
The Nandyal result will be widely seen as a trend setter for the general and assembly elections in the state in 2019 and may also alter the political equations.
For the first time, Voter Verifiable Paper Audit Trail or VVPAT was used in the by-election.
VVPAT is a machine which dispenses a slip with the symbol of the party for which a person has voted for. The slip drops in a box but the voter cannot take it home.
The by-election was held following the death of sitting MLA Bhuma Nagi Reddy in March. Mr Reddy had won the seat in 2014 as YSR Congress candidate, but jumped over to the Telugu Desam Party or TDP in 2016.
Mr Reddy's nephew Brahmananda Reddy is now the TDP candidate, while the YSRC fielded former minister Silpa Chandra Mohan Reddy who switched sides to the opposition party just days ahead of the bypoll.
Though there are 15 candidates in the fray, the main fight is between the TDP and the YSRC.