JERUSALEM (Reuters) - Israeli Prime Minister Benjamin Netanyahu was formally indicted in court on Tuesday on corruption charges after he withdrew his request for parliamentary immunity from prosecution.

Netanyahyu was in Washington for meetings with U.S. President Donald Trump ahead of the release of Trump’s long-delayed Israel-Palestinian peace plan when Israel’s attorney-general filed the charges in a Jerusalem court.

The immunity bid seemed doomed to fail from the beginning since Netanyahu, who denies any wrongdoing, lacked sufficient votes in the legislature for approval.

The request for protection from prosecution had effectively blocked the filing of the indictment until now.

As proceedings move toward trial the timeline remains unclear and it could take months or years.

In addition to his legal battle, Netanyahu is fighting for his political life in a March 2 election, Israel’s third in less than a year after inconclusive ballots in April and September.

Netanyahu, Israel’s longest-serving prime minister, said in a statement that an immunity debate in parliament would have been a “circus” and he did not want to take part in this “dirty game”.

With public attention in Israel focused on events in Washington, Netanyahu’s White House meetings seemed likely to overshadow his latest legal woes.

The veteran right-winger is under no legal obligation to resign.

Slideshow ( 5 images )

Netanyahu’s main rival, centrist former general Benny Gantz, made Netanyahu’s legal troubles a centerpiece of his campaigns in two Israeli elections last year.

Gantz made a brief trip to Washington to discuss the peace plan with Trump, and had rushed back to Israel expecting to lead the parliament debate against granting Netanyahu immunity.

“Netanyahu is going to trial - we have to move on,” Gantz said after Netanyahu pulled his immunity request.

“The citizens of Israel have a clear choice: a prime minister who works for them or a prime minister busy with himself. No one can manage the country and in parallel manage three serious criminal cases,” Gantz said in a tweet.

The corruption charges marked the first criminal indictment against a serving Israeli prime minister. The charge sheet was first published by Israel’s attorney general in November following a long-running investigation. The charges included bribery, breach of trust and fraud.

Netanyahu is suspected of wrongfully accepting $264,000 worth of gifts, which prosecutors said included cigars and champagne, from tycoons and of dispensing regulatory favors in alleged bids for improved coverage by a popular news website.Netanyahu could face up to 10 years in prison if convicted of bribery and a maximum three-year term for fraud and breach of trust.