The ruling Congress party in Karnataka today retained the assembly seats of Nanjangud (SC) and Gundlupet where by-elections were held on April 9.
Congress' Kalale N Keshavamurthy defeated his nearest rival former minister V Srinivasa Prasad (BJP) by 21,334 votes in Nanjangud.
In Gundlupet, Geetha Mahadevaprasad (Congress) trounced BJP's C S Niranjan Kumar by 10,877 votes, an election official said.
Both the seats were held by the Congress which faced a tough fight from its principal opponent the BJP, making it a prestigious battle ahead of the Assembly polls to be held in the state in about a year.
The electoral outcome comes as a boost to Chief Minister Siddaramaiah who is facing murmurs of dissonance within his party over his style of functioning, particularly from the old guard, exemplified by the recent exit of senior leader SM Krishna, a former Chief Minister.
Siddaramaiah had devoted the last eight days for the campaign crisscrossing both the constituencies and mobilised his ministers on a large scale, as the BJP went all out to make inroads into the Congress' stronghold.
It had also turned into a personal battle between Siddaramaiah and State BJP President and former Chief Minister BS Yeddyurappa, who had camped in the two constituencies for more than three weeks.
During the campaign, the two leaders made no-holds barred personal attacks.
"We respect the mandate of the electorate. It is however a well known fact that the ruling party enjoys advantage in a by-election," Yeddyurappa told reporters.
To a question, he said the results were not a "setback" to the BJP's goal to secure 150 Assembly seats in the next elections.
Yeddyurappa had headed the first-ever BJP government in the South after the 2008 Assembly polls and is now tasked to revive the party's fortunes to return to power.
Keshavamurthy polled 86,212 votes against Srinivas Prasad's 64,878 votes, election officials said.
Geetha Mahadevaprasad secured 90,260 votes as against 79,383 votes polled by Nirajan Kumar.
The bypoll were necessitated in Gundulpet following the death of Cooperation Minister Mahadevaprasad while in Nanjangud, it was caused by the resignation of Srinivas Prasad as Congress MLA after he was dropped from the ministry. Geetha is the widow of Mahadevaprasad.
Srinivas Prasad had switched over to the BJP, while Keshavamurthy had contested the 2013 Assembly polls on a JD(S) ticket.
Remaining neutral, former Prime Minister H D Devegowdaled JDS had not fielded its candidates.
The loss comes as a massive embarrassment to the BJP and BS Yeddyurappa in specific who had been confident of a victory.