The victory margin of 49 candidates was less than 5,000 votes in the recently-concluded Uttar Pradesh assembly polls.
According to the results announced on Thursday, 25 Samajwadi Party candidates were defeated by less than 5,000 votes while a similar fate awaited three nominees of the Rashtriya Lok Dal.
The SP and the RLD contested the polls in an alliance.
18 Bharatiya Janata Party candidates also lost the poll battle by less than 5,000 votes.
Allies of the saffron party -- Nishad Party and Apna Dal-Sonelal -- had to face defeat by a very small margin on two seats and one seat respectively.
The narrowest victory margin was registered in Dhampur, where BJP's Ashok Kumar Rana defeated SP's Naeem-ul-Hasan by 203 votes.
Sakendra Verma, the BJP candidate from Kursi, won the poll contest against SP's Rakesh Verma by 217 votes.
The SP candidates in Aliganj, Aurai, Bahraich, Chhibramau, Etawah, Faridpur, Jalalabad, Bindki, Jalesar, Katra, Madhuban, Manikpur, Madiyahun, Mohammadi, Moradabad Nagar, Nakud, Phulpur, Salon, Shahganj, Shravasti, Sitapur, Sultanpur and Tirwa lost by less than 5,000 votes.
The victory margin in six of these seats was less than 1,000 votes.
The RLD candidates lost from Baraut, Nehtaur and Bijnor by 315 votes, 258 votes and 1,445 votes respectively.
BJP's Kamlesh Saini was defeated by SP's Swami Omvesh by just 234 votes from Chandpur.
The saffron party lost the Ramnagar seat by 261 votes and the Isauli seat by 269 votes.
The margin of defeat for the BJP candidates was less than 5,000 votes in Basti Sadar, Bhadohi, Bisauli, Dibiyapur, Dumariaganj, Ghazipur, Etawah, Jasrana, Kithor, Meja, Patiali, Farenda, Raniganj, Sareni and Zaidpur.
It was less than 1,000 votes in six of these seats.
The Nishad Party lost the Handia and Kalpi seats to the SP by 3,543 votes and 2,816 votes respectively.
The Apna Dal-S nominee was defeated by the SP candidate from Bachhrawan by 2,812 votes.
The five biggest victory margins were registered by BJP candidates.
Sunil Kumar Sharma recorded a historic victory in Sahibabad with a margin of 2.14 lakh votes.
Pankaj Singh's victory margin in Noida was 1.81 lakh, while Amit Agarwal polled 1.18 lakh votes more than his nearest rival in Meerut Cantonment.
Purushottam Khandelwal and Srikant Sharma of the saffron party trounced their opponents by 1.12 lakh and 1.09 lakh votes from the Agra North and Mathura seats respectively.
Of the 403 assembly seats in Uttar Pradesh, the BJP bagged 255, while its allies Apna Dal-S got 12 and the Nishad Party got six.
The SP won 111 seats, while its ally RLD got eight seats and the Suheldev Bharatiya Samaj Party got six seats.
The Congress and the Jansatta Dal Loktantrik got two seats each and the Mayawati-led Bahujan Samaj Party got one seat.