JERUSALEM (Reuters) - The speaker of Israel’s parliament, an ally of Prime Minister Benjamin Netanyahu, resigned on Wednesday, sharpening a battle with the Supreme Court over its concerns that democracy could be a casualty of the coronavirus crisis.

FILE PHOTO: Israeli Prime Minister Benjamin Netanyahu and Israeli Knesset Speaker Yuli Edelstein attend a ceremony marking the annual Israeli Holocaust Remembrance Day at the Yad Vashem World Holocaust Remembrance Center in Jerusalem, April 12, 2018. REUTERS/Amir Cohen/File Photo

Yuli Edelstein’s resignation removes a potential obstacle to plans by the opposition to enact a law that would bar Netanyahu, as an indicted suspect in three corruption cases, from forming a new government after Israel’s March 2 election.

Edelstein, a member of Netanyahu’s right-wing Likud party, announced he was quitting in a speech to parliament, accusing the court of “gross and arrogant meddling” in legislative affairs by ordering him to schedule a vote for the speaker’s position at Wednesday’s Knesset session..

Likud rallied behind Edelstein even as parliament’s legal adviser formally informed him he was violating the ruling, despite his resignation - noting it goes into effect only in 48 hours.

“We salute you, Yuli,” Likud said on its Twitter feed.

Facing possible punitive measures, Edelstein said in a statement: “I have no desire to be in contempt of court but my conscience does not allow me to respect the court’s order.”

With Netanyahu’s opponents, led by Benny Gantz’s centrist Blue and White party, holding a slim majority in parliament after the national election, Edelstein was likely to have lost his post if a vote in the legislature had gone ahead.

Netanyahu, who has denied accusations of bribery, fraud and breach of trust, made no comment on the loss of an ally who could have run interference against legislation by Blue and White aimed at ending an 11-year tenure weakened by three inconclusive elections in less than a year.

Edelstein, a jailed dissident in the former Soviet Union, had cited the coronavirus crisis and pursuit of the Netanyahu’s call for a “national emergency government” with Gantz for postponing a vote for the speaker’s post.

In a ruling on Monday, Chief Justice Esther Hayut said Edelstein’s reasoning “undercuts the foundations of the democratic process”.

After announcing he was stepping down, Edelstein adjourned parliament until Monday. Blue and White and a civil liberties group, the Movement for Quality Government in Israel, petitioned the court to hold him in contempt.

Netanyahu currently heads a caretaker government. His critics accused him of autocracy after he invoked a series of emergency regulations during the coronavirus crisis. The measures led to a two-month delay in the start of his trial.

Israel’s longest-serving leader, Netanyahu, 70, has said he is committed to preserving democracy.