Surrounded by jubilant supporters Mr Kunhalikutty said the party has led in village councils where the Left was ruling.
"This is because the electorate has placed faith in me as I spoke about the need for a secular outlook. Also, the unity of the Congress-led United Democratic Front (UDF) has helped us in this," he said.
The Malappuram by-election on April 12 saw 71.33 per cent voter turnout. The re-poll was necessitated after the death of sitting lawmaker and IUML leader Ahamed.
Malappuram district has been a stronghold of the IUML and Mr Ahamed won the 2014 polls with a record margin of 1.94 lakh votes. But during the 2016 assembly elections, the margin of the IUML legislators, who won in all the seven assembly constituencies, came down to 1.18 lakh votes.