Congress general secretary Priyanka Gandhi Vadra spoke with Samajwadi Party president Akhilesh Yadav over phone on Wednesday to break the deadlock on seat-sharing for Lok Sabha polls in Uttar Pradesh and clinch an alliance, sources said.
The two parties announced their tie-up in the evening with the Congress set to contest 17 seats in the state.
The sources had earlier said the alliance had been all but sealed and the only seat on which the SP had to take a call was on Shrawasti which it finally decided to keep for itself.
The sources said earlier the Congress was being given a "raw deal" with seats where winnability was low and the party was asking for alternative constituencies.
According to an agreement reached after the telephonic conversation between Priyanka and Akhilesh Yadav, the Congress has now got seats such as Sitapur and Barabanki.
Besides these seats, the Congress will also contest Amethi, Raebareli, Kanpur Nagar, Varanasi, Saharanpur, Amroha, Fatehpur Sikri, Maharajganj, Bansgaon, Bulandshahr, Ghaziabad, Mathura, Prayagraj, Deoria and Jhansi.
The Congress is now getting a "fair deal" in the alliance, a source said.
In the Moradabad division, the Congress was asking for two seats but has agreed on Amroha alone, the sources said.
Earlier, Akhilesh Yadav on Wednesday said an alliance with the Congress will happen in Uttar Pradesh.
His party had earlier said he would join Rahul Gandhi's Bharat Jodo Nyay Yatra only if its seat-sharing proposal for the polls is accepted. Akhilesh Yadav did not join the yatra in Raebareli on Tuesday.
There is a strong buzz that he could join the yatra in Agra.
On Monday, the SP had said it offered 17 Lok Sabha seats in Uttar Pradesh to the Congress.
The SP and the Congress are partners in the INDIA bloc formed by opposition parties to take on the BJP in the upcoming general elections.
Except for the headline, this story has not been edited by The Telegraph Online staff and has been published from a syndicated feed.