Congress candidate R Selvaraj defeated the CPI-M's F Lawrence by a comfortable margin of 6,334 votes in the June 4 bypoll whose outcome has come as a morale-booster to the one-year old Oommen Chandy ministry.
Selvaraj had resigned as CPI-M member of the assembly in March this year citing serious differences with the party leadership, causing the byelection, before joining Congress.
Though Bharatiya Janata Party candidate O Rajagopal finished third, he put up a credible fight polling 30,507 votes as against 52,528 by Selvaraj and 46,194 by the CPI-M candidate.
With today's result, the UDF's strength in the 140-member assembly goes up to 73 and the LDF's reduced to 67.
The verdict came as a grim blow to the CPI-M at a time when the party is already on the back foot in the wake of the arrest of some of its activists in connection with the recent brutal murder of Marxist rebel and RMP leader T P Chandrasekharan, a key issue in the bypoll.
KPCC president Ramesh Chennithala said the result was an endorsement of the performance of the Chandy government and a befitting reply to the "politics of violence" practised by the CPI-M.
This is the second assembly by-poll won by the UDF after coming to power in May 2011. Four months back, its candidate Anoop Jacob of the Kerala Congress-J retained the Piravom seat in Ernakulam district.
Polling gets underway for by-election in Kerala
One more arrested for RMP leader's murder
Modi has no moral right to criticise me: Kerala MLA
YSR Congress heading for an EASY win in AP by-polls
SIT ready to probe any case raised by CPI-M