Uttar Pradesh Chief Minister Mulayam Singh Yadav won the trust vote on Monday evening by a margin of 90 votes.
Aided by Bahujan Samaj Party rebels, he polled 244 votes in his support. 154 legislators voted against him in a house of 403 members. A total of 398 members participated in the voting after a day-long debate.
The chief minister proved his majority in compliance with the directive of Governor Vishnukant Shastri to do so within 14 days of his assuming office on August 29.
Mulayam had faced an uncertain fate when he assumed chief ministership 11 days ago, clearly lacking the number to muster majority.
But as days went by, Yadav consolidated his position by splitting the 110-member BSP legislature party and luring 37 of them to merge with his Samajwadi Party boosting its strength in the assembly from 144 to 181.
The support of breakaway BSP MLAs left little doubt about Yadav having a smooth sailing in the trial of strength.
Yadav's tally of votes increased by three votes with the joining of more BSP deserters to the treasury bench.
Two members abstained from voting.
After the 11-hour debate on the confidence motion, speaker Keshrinath Tripathi first called for voice vote but on the insistence of Congress Legislature Party leader Pramod Tiwari gave his nod for the counting of hands.
After the count, the speaker declared 244 votes in favour of the motion while 154 against, amid thumping of desks by ruling coalition partners Samajwadi Party, Rashtriya Lok Dal,
Congress Party, Rashtriya Kranti Party, Communist Party of India -- Marxist, Samajwadi Janata Party, Janata Dal -- United, Samata Party and independents.