Maharashtra Chief Minister Devendra Fadnavis on Monday announced that his Bharatiya Janata Party will ally with the Shiv Sena in the Lok Sabha and state Assembly elections. The development came after months of uncertainty caused by the Shiv Sena criticising its ally of maladministration. The Shiv Sena had earlier ruled out joining the saffron party for the General Elections.

Fadnavis met Bharatiya Janata Party national President Amit Shah and Shiv Sena leaders Uddhav Thackeray and Aditya Thackeray before making the announcement, Mumbai Mirror reported. “The BJP and Shiv Sena were allies for 25 years,” Fadnavis said. “We are both Hindutvawadi parties, though we did have our differences. Last Assembly elections, we were not together but we have run a government in coalition.”

Fadnavis said the Shiv Sena will fight on 23 seats and the BJP will contest from 25 seats in the upcoming Lok Sabha elections, according to ANI. “For Maharashtra assembly elections, we will hold discussions with our other allies,” he added. “Leaving the numbers of seats taken by our allies, BJP and Shiv Sena will fight on equal number of seats.”

Shah downplayed the rift between the parties. “For 25 years, we stood united, and for five years, there was confusion,” Shah said.

Meanwhile, Thackeray insisted on a Ram Mandir being built at the earliest at the disputed site in Uttar Pradesh’s Ayodhya. “The Ram temple has been the common thread for the alliance between the BJP and Shiv Sena,” Thackeray said.

On February 14, Shiv Sena leader Sanjay Raut had said that the Bharatiya Janata Party should offer the chief minister’s post to its alliance partners in the states if it wants the tie-ups to continue for the Lok Sabha elections.

The parties have been long-time allies. According to a seat-sharing agreement that they had, the BJP used to get larger number of seats in the Lok Sabha elections while the Shiv Sena used to get majority of the tickets for the state Assembly elections. However, the BJP decided to contest the the 2014 Assembly elections alone and won 112 seats while the Shiv Sena won 63, making it the junior partner in the state government.

The Shiv Sena has since been critical of the BJP’s policies in the state and at the Centre. On January 6, BJP President Amit Shah and Fadnavis suggested to party workers that they might have to contest the upcoming Lok Sabha elections alone.