Sriganesh of the Congress defeated his nearest rival, T.N. Vamsha Tilak of the Bharatiya Janata Party (BJP) by 13,206 votes.
Sriganesh polled 53,651 votes, while Tilak secured 40,445 votes. Nivedita Sayanna of BRS finished third, polling 34,462 votes.
The death of Nivedita's sister and sitting MLA Nanditha's death in a road accident in February had resulted in the vacancy.
Nanditha died in a car crash near Hyderabad on February 23.
The 37-year-old was elected in the elections held in November, 2023. She was the daughter of BRS leader five-time MLA from Secunderabad constituency, G. Sayanna, who had passed away on February 19 last year due to illness.
Nanditha had defeated her nearest rival Narayanan Sriganesh of BJP by a margin of 17,169 votes.
Sriganesh recently joined the ruling Congress and secured the ticket.
The by-election was crucial for the Congress which has a slender majority in the state Assembly and was looking to make inroads into Hyderabad as it drew a blank in the state capital in the Assembly polls.
The Congress won 64 seats in the 119-member Assembly in 2023 polls. However, it drew a blank in Greater Hyderabad region, which sends 24 MLAs.
BRS, which won 39 seats, has lost at least three MLAs to the ruling party.
The defeat in the by-election came as another shock for BRS, which drew a blank in Lok Sabha polls.