Set for a fourth term as chief minister, the 51-year-old Dalit leader unseated her bitter rival Mulayam Singh Yadav and delivered a body blow to the BJP's hopes of building on its string of victories in Punjab, Uttarakhand and Mumbai corporation.
The BSP, which always campaigned on an anti-upper caste plank in its two decades of electoral politics, fought the polls this time without any allies and won 206 of the 402 seats for which results were declared.
This just crosses the halfway mark in the 403-member House. Election to one seat was countermanded due to the death of a candidate.
Mulayam, who won from both Gunnaur and Bharthana, conceded defeat in the wake of his party's drubbing and resigned in the afternoon. His Samajwadi Party suffered severe losses, winning 97 seats.
Consolidating on her traditional base among Dalits, Mayawati gave tickets to 138 upper caste candidates, including 86 Brahmins and a large number of Muslims and OBCs, besides 93 Dalits.
While the BSP won 99 seats in the 2002 elections, the Samajwadi Party had bagged 143.
In Friday's results, the BJP lost a lot of ground, winning only 51 seats against the 88 it had in the outgoing House.
Chief campaigner Rahul Gandhi's electioneering appeared to have helped the Congress only retain its existing strength in the House. It won 22 seats against the 25 it had in the previous assembly.
Independents and others accounted for 26 seats.
Prominent among the winners were state Transport Minister Naresh Agarwal (Hardoi), the chief minister's brother, PWD Minister Shivpal Singh Yadav (Jaswantnagar), Minister of State for PWD Arvind Singh Gope (Haidergarh) and Rashtriya Parivartan Dal president D P Yadav (Sahaswan).
Among those who lost were state BJP president and assembly Speaker Kesari Nath Tripathi (Allahabad South), rebel Samajwadi Party leader Beni Prasad Verma (Ayodhya), Agriculture Minister Ashok Bajpai (Pihani), Minister Ujjawal Raman Singh (Karchchana) and Apna Dal president Sone Lal Patel (Kolasla).