KATHMANDU (Reuters) - Nepal’s faltering democratic transition has been thrown into turmoil by a clash between the Himalayan nation’s Maoist-led government and the head of the Supreme Court that could derail this month’s local elections.

Men unload ballot boxes for the upcoming local election of municipalities and villages representatives at the election commission in Kathmandu, Nepal April 23, 2017. REUTERS/Navesh Chitrakar/Files

The poor, mountainous state of 28.6 million people is nearing the finish line of a decade-long effort to overcome the aftermath of an insurgency and fall of its monarchy that would culminate in a general election later this year.

The interim step of holding the first local elections in two decades, scheduled for May and June, is now in doubt after a top minister in charge of overseeing security for the vote quit his post on Sunday.

Analysts say the resignation of Deputy Prime Minister Bimalendra Nidhi could increase instability in the coalition and one of the parties in the seven-party coalition government could walk out as a result.

“The local elections are in doubt because of the resignation,” said Kunda Dixit, editor of the Nepali Times weekly.

The trigger for Nidhi’s resignation on Sunday was a clash over a decision by Nepal’s first woman chief justice, Sushila Karki, to overturn the government’s appointment of a new national police chief two months ago.

The two main parties in the coalition filed an impeachment motion against Karki on Sunday. She has been suspended pending impeachment proceedings in the coming weeks, said officials.

“She has interfered into the domains of the executive and must be removed,” said lawmaker Chin Kaji Shrestha of the Nepali Congress party, the biggest group in the coalition.

Analysts say the move to unseat a judge known for delivering judgments free of the influence of politics or personal ties represented an attack on the independence of judiciary.

“It has raised the danger of the parliamentary majority being used against constitutional bodies that don’t obey political leaders,” constitutional expert Bipin Adhikari said.

Nepal, which adopted a new constitution in 2015, has set elections to 744 village and municipal councils for May 14 and June 14 that would pave the way for provincial and national elections.

The Rastriya Prajatantra Party, the third largest group in the coalition, was due to meet on Monday to consider whether to remain in the coalition if the impeachment motion against Karki is not withdrawn, RPP official Mohan Shrestha said.

The coalition government led by Maoist Prime Minister Prachanda controls 363 seats in the 601-member parliament. The departure of the RPP, which has 37 seats, would leave it with a reduced majority.

The government denied there was any crisis. “We’ll hold the local elections as scheduled,” Law Minister Ajaya Shankar Nayak told Reuters.