The link up between Kumar's Janata Dal United party and the prime minister's right-wing Bharatiya

A former arch-rival of Indian Prime Minister Narendra Modi aligned with the Hindu nationalist leader on Thursday to form a new government in Bihar, one of the country's most populous states.

The outspoken Nitish Kumar took the oath as Bihar's chief minister just hours after standing down in protest at corruption allegations against his last coalition partner.

The link up between Kumar's Janata Dal United party and the prime minister's right-wing Bharatiya Janata Party (BJP) further tightens Modi's grip on power ahead of national elections in 2019.

Kumar had been considered a potential challenger to Modi for India's top job.

The BJP, which this month easily won the presidential election for the first time, now rules 17 of India's 29 states either directly or in alliance with regional parties.

Bihar, with a population of 100 million people but impoverished and frequently scandal-tainted, has seen a titanic power struggle in recent years.

In 2013 then-chief minister Kumar pulled his party out of a 17-year-old alliance with the BJP over Modi's appointment as party leader.

He had called Modi a "fascist" and "Hitler" over his alleged anti-Muslim and hardline Hindu politics.

After stepping down in 2014 as chief minister after a poor showing in elections, Kumar forged a "grand alliance" with another ex-rival and former chief minister, Lalu Prasad Yadav, to thwart Modi's right-wing Hindu party in the following year's state polls.

The alliance, which also involved the main opposition Congress party, was seen as a possible prototype for a national bid to stop Modi's getting reelection.

Yadav's son Tejashwi Yadav became a deputy chief minister under the deal, but is now under investigation by federal investigators over an illegal land deal. He has denied the charges.

His father was jailed and has been banned from elected office since 2013 over a separate million dollar fodder scam.

After several calls for Tejashwi Yadav to stand down, Kumar resigned late Wednesday saying it was "impossible" to carry on.

Kumar will face a floor test on Friday to prove his new majority.

"I promise that I will stay committed to the people of Bihar," Kumar told reporters after taking oath in state capital Patna.

Modi congratulated Kumar for taking over as the chief minister, a day after he commended him for taking a stand against corruption.

- Masterstroke -

Both his former coalition partners lashed out at their erstwhile ally, calling him an opportunist and accusing him of treachery.

Yadav's party announced they would challenge Kumar's nomination as chief minister in court.

"Nitish Kumar is a huge opportunist. The mandate was against BJP, to throw Modi out of Bihar," Yadav told reporters after appearing in a court in a long-running corruption trial.

Congress vice-president Rahul Gandhi accused Kumar of "cheating" voters and the opposition alliance.

Kumar, who has ruled the state intermittently for 12 years, is regarded as a clean figure in the scandal-ridden state.

He was credited with turning Bihar from a lawless, near ungovernable state to one of the fastest growing provinces in India.

Siding with Modi, and avoiding being tarnished by the corruption charges dogging his former allies, was a "masterstroke", Patna-based political analyst Saibal Gupta told AFP.

Source: AFP