Capping days of feverish parleys, Congress and Samajwadi Party today forged an alliance to contest the UP Assembly polls together.
At a joint press conference here, leaders the two parties said SP will contest 298 of the 403 seats and Congress the remaining 105.
"SP and Congress have forged an alliance and will contest UP assembly polls together," SP state president Naresh Uttam told the hurriedly convened media briefing.
UP PCC chief Raj Babbar hoped the SP-Congress alliance will reap a bumper electoral harvest in the state and fulfil aspriations of all sections of the society.
He said a Common Minimum Programme will be drafted within a week.
Talks between top Congress and SP leaders had been going on for the last several days for but an announcement got delayed as the two parties refused to scale down their demand for the number of seats each would contest.
Sources said the alliance materialised after Congress President Sonia Gandhi intervened.
They said top leaders of both the parties finalised the seat sharing arrangement around wee hours today.
Senior Congress leader Ahmed Patel had earlier tweeted: "Discussion was at highest level- CM (UP), GS I/C & Priyanka Gandhi."
Prospects of forming of an alliance between Samajwadi Party and Congress for the Uttar Pradesh polls had run into rough weather, with both parties hardening their stance over the number of seats.
At one stage senior SP leader Naresh Agarwal had said the possibility of an alliance was "almost over" and blamed the "stubborn" attitude of Congress for the deadlock.
Chief Minister Akhilesh Yadav had initially offered 100 seats to Congress but they demanded 120.
Samajwadi Party then argued that it had 234 sitting legislators and there were some others who would also contest. Thus, the ruling party needed at least 300 of the 403 seats.
But, Congress leaders had informed the SP that in such a scenario, there cannot be an alliance. On the other hand, Congress' Central Election Committee met in Delhi and went ahead with finalising candidates for 140 seats which will go to polls in the first two phases.
The party, however, did not declare its candidates for these seats, leaving a window for a possible alliance for which talks were held till wee hours today.
"We had a meeting of CEC for the first and second phase," Congress general secretary incharge of Uttar Pradesh Ghulam Nabi Azad had told reporters in Delhi yesterday, adding the party's candidates for 140 seats were finalised.
However, a cofident UP Congress chief Raj Babbar had maintained, "There are no roadblocks in the talks."
Congress was also learnt to have been demanding that its candidates should be fielded in Amethi and Rae Bareli segments of the Lok Sabha constituencies represented by Sonia Gandhi and Rahul Gandhi. It was not immediately known to what extent the SP had accomodated Congress' demand.
Congress was also keen to include Ajit Singh-led RLD in the alliance, which the Samajwadi Party did not want.
SP had maintained it will have no truck with RLD and, if Congress wanted, it could give its share of seats to Ajit Singh's party.
SP vice president Kironmoy Nanda said after the alliance with Congress, "We will get an absolute majority in the state and Akhilesh will become chief minister again."
In the 2012 Assembly polls, SP had won 224 seats with a vote share of 29.3 per cent, while Congress had bagged 28 seats with an 11.7 per cent vote share. A party or alliance which garners 40 per cent of the votes will sweep the polls.
Earlier, RJD president Lalu Prasad today tweeted that he was in talks with the Congress and Samajwadi Party for forging an alliance between the two parties in Uttar Pradesh.
"I have been consistently in talks with Samajwadi Party and Congress' top leadership for stitching an alliance between the two parties in Uttar Pradesh," he said in a tweet.
"Hoping and doing my best to stitch the Bihar-like alliance," Prasad tweeted.
Prasad, who has family ties with Mulayam, had tried in vain to intervene in the battle for party's leadership between the SP patriarch and his Chief Minister son Akhilesh Yadav in the power game in the ruling party.
Once Akhilesh finally wrested the SP chief's post from his father and got its 'bicycle' symbol from the Election Commission, the Prasad family pitched its support to him and promised to campaign for the faction led by the chief minister.