Veteran politician Mulayam Singh Yadav has been sworn in as the new chief minister in India's most populous state, Uttar Pradesh (UP).
Mr Yadav's championing of minorities has proved popular
Mr Yadav took the oath of office on Friday in the UP capital, Lucknow, as thousands of his supporters celebrated in the streets.
The move comes after Mr Yadav, whose Samajwadi Party represents those between the upper and lower castes, gathered enough support to try to form a majority in the state.
Former chief minister Mayawati handed in her resignation on Wednesday following differences with her coalition partner, the Bharatiya Janata Party.
Uttar Pradesh is heavily represented in the federal parliament and political parties have often formed uneasy alliances to try to gain power in the state.
Friday's swearing-in ceremony was attended by a wide array of political figures, from hardline Marxists to leaders of the state's peasant farmers and lower castes.
Mr Yadav, 63, met the governor of Uttar Pradesh on Wednesday where he was asked to show the governor that he had acquired enough support to form a new administration.
The governor has given Mr Yadav 14 days to show he has a workable majority in the state assembly.
His Samajwadi Party won the most seats in elections last year, 143 out of 403.
Mr Yadav has 14 days to build a working majority
But it was Ms Mayawati, representing Uttar Pradesh's lower castes, who took power, after forming an alliance with the Bharatiya Janata Party (BJP) that traditionally takes its support from upper caste Hindus.
Since then, however, deep divisions emerged between Ms Mayawati's Bahujan Samaj Party (BSP) and the BJP.
These were brought to a head in fierce recriminations over a controversial project to build a shopping and entertainment complex near India's most famous monument, the Taj Mahal at Agra.
Federal police are investigating who was behind the project, which contravened conservation rules.
Mulayam Singh Yadav is a veteran of Uttar Pradesh politics, having been its chief minister twice before. He has also served as defence minister at national level.
To form a majority now in Uttar Pradesh he has been courting other opposition parties, including the Congress Party of Sonia Gandhi.
That marks a reversal in relations as Mr Yadav led criticisms of Ms Gandhi, saying she was an unsuitable leader in Indian politics because of her Italian background.
In turn, Congress refused to support his efforts to form a government in Uttar Pradesh last year.
The left-leaning Mr Yadav is popular in rural areas and among the state's backward castes - those between the upper and lower castes.
The BBC's Ram Dutt Tripathi in Lucknow says that, given Uttar Pradesh's political instability, Mr Yadav will have a hard time keeping his coalition government together if he comes to power.