IUML chief PK Kunhalikutty, who vacated the Vengara seat and later won the Malappuram Lok Sabha seat earlier this year, said the CPI-M used all its might to secure the seat.
According to the Chief Electoral Officer, Khader got 65,227 votes, CPI-M candidate PP Basheer came second with 41,917 votes followed by Social Democratic Party of India candidate KC Naseer and BJP's K Janachandran in the third and fourth positions.
A total of 502 voters pressed the NOTA button.
The by-election was necessitated when legislator Kunhalikutty vacated the seat after he was elected from the Malappuram Lok Sabha constituency in April this year.
IUML, the second biggest constituent of the Congress-led UDF, had fielded two-time former legislator Khader.
In the Lok Sabha polls, Kunhalikutty had secured a margin of over 40,000 votes, while at the 2016 assembly polls he won with a margin of over 38,000 votes.
"I am going back with lots of happiness as the Left did their best to see the back of me, but I managed to win easily. I thank all the people of this constituency and the UDF leaders," said Khader.
Basheer said that he has been able to break the myth that the IUML was all prevailing and powerful.
"Just see the votes that we have managed to get and we could take the fight into several strongholds of the IUML," said Basheer.
Meanwhile, Communist Party of India-Marxist state secretary Kodiyeri Balakrishnan said the results showed that the Congress-led opposition was on its way out.
"The IUML might have a technical victory, but we have scored a political victory."