IUML candidate K N A Khader won the seat with a margin of 23,310 votes over CPI-M nominee P P Basheer, a district official said after the result was announced.
BJP candidate K Jayachandran Master secured 5,728 votes and SDPI'S K C Naseer got 8,648 votes.
More From This Section
The UDF and LDF garnered 65,227 and 41,917 votes respectively.
The constituency had recorded a 72.12 percentage voter turnout during the by-election held on October 11.
However, the UDF's victory margin was less than it received in the 2016 assembly polls, in the segment considered to be a stronghold of IUML.
IUML leader P K Kunalikutty had won the seat with a huge margin of 38,057votes beating CPI-M's Basheer in 2016.
The BJP had polled 7,211 votes in the segment.
Reacting to the poll verdict, Leader of Opposition in the Kerala Assembly, Ramesh Chennithala said even after LDF "misused" official machinery, the UDF candidate won the by-election.
He also said even after LDF played the solar scam card they could not manage.
CPI(M) State Secretary Kodiyeri Balakrishnan said the increased vote share of LDF clearly showed that the programme's of the government led by Pinarayi Vijayan has the support of people.
The victory of UDF is only "technical" and they were not able to maintain the lead they secured last year, he said.
The by-election was necessitated after sitting MLA P K Kunhalikutty quit following his election to parliament from Malappuram Lok Sabha segment that fell vacant after the death of IUML leader and former union minister E Ahmed in February last.