The opposition leader in India's most populous state, Uttar Pradesh, has been appointed to head a new government.
The move comes after Mulayam Singh Yadav, whose Samajwadi Party represents those between the upper and lower castes, gathered enough support to try to form a majority in the state.
Mr Yadav is a veteran of Uttar Pradesh politics
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.
Mr Yadav, 63, is due to be sworn in as chief minister of Uttar Pradesh on Friday.
He met the governor of Uttar Pradesh on Wednesday where it is reported he was asked to show the governor that he had acquired enough support to form a new administration.
Now 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.
Ms Mayawati has been in bitter rows with her BJP allies
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.
But since then there have been deep divisions 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.