BJP president Amit Shah and Union minister Nitin Gadkari played behind-the-scene roles in ensuring the party retained power in Goa, after the death of Manohar Parrikar, sources familiar with the developments said.
The impasse over government formation, which included dealing with stubborn allies wanting to extract their pound of flesh, was resolved with deft handling of the situation by the two senior BJP leaders, party sources said Tuesday.
In 2017 also, after the BJP failed to get a majority in the state Assembly polls, Mr Gadkari had flown in here to help the BJP in cobbling up an alliance with smaller parties in the coastal state, after which a government was formed under Mr Parrikar's leadership.
The sources said the BJP expected a crisis in Mr Parrikar's absence, as the alliance was formed (in 2017) only on the plank of supporting the late leader become the CM.
When Mr Parrikar died on Sunday after battling pancreatic cancer, the BJP swung into action even as MLAs of ally Maharashtrwawadi Gomantak Party (MGP) huddled in a meeting.
Vijai Sardesai of another alliance partner Goa Forward Party (GFP) along with his own party members and other independent legislators, including ministers Rohan Khaunte and Govind Gawade, also began holding meetings.
As the leadership change became imminent, the BJP sent Mr Gadkari to Goa, experienced at handling the political situation there, with the mandate of doing all that was required to retain power there.
Sources said Mr Gadkari held one-on-one discussions throughout the night with all MLAs supporting the government, but no consensus was reached among the warring factions.
Even as MGP legislator Sudin Dhavalikar staked his claim for the top post, the BJP Legislature Party proposed Pramod Sawant's name while the GFP and others supported Vishwajit Rane as the chief ministerial candidate.
Despite several rounds of meetings, there was no consensus till Monday morning.
While the BJP was grappling with these issues, the opposition Congress in the meantime submitted a letter to Governor Mridula Sinha, staking claim to form government, saying it was the single largest party with 14 MLAs.
The Congress claimed it had majority support.
Till Monday evening, as Mr Parrikar was being cremated with state honours, there was no clarity on the new government formation.
Things started moving when BJP president Amit Shah held a meeting of his party MLAs and MGP's Sudin Dhavalikar at a hotel.
Mr Gadkari, who earlier announced that he would be leaving the state soon, also stayed back and by late evening things started falling in place, the sources said.
"A formula which was acceptable to all coalition partners was worked out, under which Sawant emerged as the chief ministerial candidate while Mr Sardesai and Mr Dhavalikar were to be designated as his deputies," the source said.
The alliance partners also suggested that status quo on the cabinet be maintained, implying that all the ministers be sworn in again, which was agreed upon.
Though the BJP was optimistic that the Pramod Sawant-led alliance would be sworn in at 9 pm, some last minute glitches gave rise to uncertainty.
Mr Gadkari then sat to trouble-shoot things, as several issues, including a common minimum programme and power sharing, were worked out, said sources who were part of the discussions.
Finally, around 1.30 am on Tuesday, the BJP-led coalition decided to stake claim and all the leaders, including Mr Gadkari, rushed to the Raj Bhawan to stake claim to form the new government and minutes later, Mr Sawant and 11 ministers were sworn in at the oath ceremony held in the wee hours of Tuesday.