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.
Also Read
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.
To read the full story, Subscribe Now at just Rs 249 a month
Already a subscriber? Log in
Subscribe To BS Premium
₹249
Renews automatically
₹1699₹1999
Opt for auto renewal and save Rs. 300 Renews automatically
₹1999
What you get on BS Premium?
-
Unlock 30+ premium stories daily hand-picked by our editors, across devices on browser and app.
-
Pick your favourite companies, get a daily email with all news updates on them.
Full access to our intuitive epaper - clip, save, share articles from any device; newspaper archives from 2006.
Preferential invites to Business Standard events.
Curated newsletters on markets, personal finance, policy & politics, start-ups, technology, and more.
Need More Information - write to us at assist@bsmail.in