"The alliance has been finalised. We will contest the by-polls together," Food and Civil Supply Minister Shyam Razak told media persons after he met Rashtriya Janata Dal (RJD) chief Lalu Prasad.
Razak made the statement after former chief minister and Janata Dal-United leader Nitish Kumar spoke with Lalu Prasad over telephone Friday night.
"Nitish Kumar and Lalu Prasad have finally approved the alliance," a JD-U leader close to Nitish Kumar said.
JD-U leaders said a formal announcement of the alliance will be made July 30.
RJD leader Prabhunath Singh and Abdul Bari Siddiqui also expressed the same views.
Razak held discussions with Lalu Prasad at the official residence of his wife and former chief minister Rabri Devi for nearly two hours Saturday.
Both JD-U and RJD leaders said their alliance was a must to strengthen secular forces and defeat communal parties in the state.
Earlier, Nitish Kumar also said all secular parties needed to come together in the state, and included the Congress and the Left parties in this category.
Last month, the RJD supported the JD-U's two candidates in the Rajya Sabha by-polls.