FILE - In this Sept. 10, 2019 file photo, Israeli Prime Minister Benjamin Netanyahu, speaks during a press conference in Tel Aviv, Israel. Israel’s attorney general on Thursday, Nov. 21, formally charged Netanyahu in a series of corruption cases, throwing the country’s paralyzed political system into further disarray and threatening his 10-year grip on power. Netanyahu angrily accused prosecutors of staging “an attempted coup.” (AP Photo/Oded Balilty, File)

JERUSALEM (AP) — Prime Minister Benjamin Netanyahu was indicted Thursday in a series of corruption cases, throwing Israel’s paralyzed political system into further disarray and threatening his 10-year grip on power. He rejected calls to resign, angrily accusing prosecutors of staging “an attempted coup.”

The first-ever charges against a sitting Israeli prime minister capped a three-year investigation, with Attorney General Avichai Mandelblit indicting Netanyahu for fraud, breach of trust and accepting bribes.

“A day in which the attorney general decides to serve an indictment against a seated prime minister for serious crimes of corrupt governance is a heavy and sad day, for the Israeli public and for me personally," Mandelblit, who was appointed by Netanyahu, told reporters.

The indictment does not require the 70-year-old Netanyahu to resign, but it significantly weakens him at a time when Israel’s political parties appear to be limping toward a third election in under a year.

An ashen-faced Netanyahu appeared on national TV late Thursday, claiming he was the victim of a grand conspiracy by police and prosecutors who had intimidated key witnesses into testifying against him.

He defiantly claimed the indictment stemmed from “false accusations” and a systematically “tainted investigation,” saying the country was witnessing an “attempted coup” against him.

“Police and investigators are not above the law,” he said. “The time has come to investigate the investigators.”

Netanyahu is desperate to remain in office to fight the charges. Under Israeli law, public officials are required to resign if charged with a crime. But that law does not apply to the prime minister, who can use his office as a bully pulpit against prosecutors and try to push parliament to grant him immunity from prosecution.

As the investigation gained steam in recent months, Netanyahu has repeatedly lashed out at what he sees as a hostile media, police and justice system. Observers have compared his tactics to those of his good friend, U.S. President Donald Trump, who has used similar language to rally his base during an accelerating impeachment hearing.

Several dozen supporters and opponents of Netanyahu staged rival demonstrations outside the prime minister’s official residence Thursday night. Police kept the groups apart and there were no reports of violence.

Mandelblit rejected accusations that his decision was politically motivated and said he had acted solely out of professional considerations. He criticized the often-heated pressure campaigns by Netanyahu’s supporters and foes to sway his decision, which came after months of deliberations. Both sides had staged demonstrations outside or near his home.

“This is not a matter of politics,” he said. “This is an obligation placed on us, the people of law enforcement, and upon me personally as the one at its head."

According to the indictment, Netanyahu accepted hundreds of thousands of dollars of champagne and cigars from billionaire friends, offered to trade favors with a newspaper publisher and used his influence to help a wealthy telecom magnate in exchange for favorable coverage on a popular news site.

Netanyahu becomes Israel’s first sitting prime minister to be charged with a crime. His predecessor, Ehud Olmert, was forced to resign a decade ago ahead of a corruption indictment that later sent him to prison for 16 months.

The decision comes at a tumultuous time for the country. After an inconclusive election in September, both Netanyahu and former military chief Benny Gantz, leader of the Blue and White party, have failed to form a majority coalition in parliament. It‘s the first time in the nation’s history that that has happened.

After Gantz’s deadline expired at midnight, the country on Thursday entered an unprecedented 21-day period in which any member of parliament can try to rally a 61-member majority to become prime minister.

If that fails, new elections would be triggered, setting the stage for a three-month campaign followed by weeks or months of post-election negotiations and horse trading.

The only apparent way out of the crisis would be a unity government between the two parties, which together control a parliamentary majority. But after Thursday’s indictment, that possibility appeared even more remote.

Blue and White leaders said it was impossible for Netanyahu to rule under indictment and warned that there was a risk his personal considerations could influence his decisions.

“A prime minister up to his neck in corruption allegations has no public or moral mandate to make fateful decisions for the state of Israel,” the party said in a statement.

The most serious charges against Netanyahu were connected to so-called “Case 4000,” in which he is accused of passing regulations that gave his friend, telecom magnate Shaul Elovitch, benefits worth over $250 million to his company, Bezeq. In return, Bezeq’s news site, Walla, published favorable articles about Netanyahu and his family.

The relationship, it said, was “based on a mutual understanding that each of them had significant interests that the other side had the ability to advance.” It also accused Netanyahu of concealing the relationship by providing “partial and misleading information” about his connections with Elovitch.

Two close aides to Netanyahu testified against him in the case.

The indictment also described billionaires Arnon Milchan and James Packer as a “supply channel” of champagne and cigars for Netanyahu. It estimated the value of the gifts at roughly $200,000.

It said Netanyahu assisted the Israeli Milchan, a Hollywood mogul, in extending his U.S. visa. It was not immediately clear what, if anything, Packer, who is Australian, received in return.

The final case accuses Arnon Mozes, publisher of the Yediot Ahronot daily, of offering positive coverage of Netanyahu in exchange for pushing legislation that would have harmed a free newspaper that has cut into Yediot’s profits.

In recent months, Likud leaders have remained firmly behind Netanyahu. But after the indictment, they were largely mum.

In the first sign of rebellion, Netanyahu’s top Likud rival earlier in the day called for a leadership primary should the country, as expected, go to new elections.

"I think I will be able to form a government, and I think I will be able to unite the country and the nation," Gideon Saar said at the Jerusalem Post Diplomatic Conference in Jerusalem. He spoke before the indictment was announced and did not address the looming criminal charges.

If elections are held, opinion polls are already predicting a very similar deadlock, with Likud and Blue and White both unable to secure a parliamentary majority.

That could now change. A poll carried out last month by the Israel Democracy Institute, a nonpartisan think tank, found that 65% of Israelis thought Netanyahu should resign as head of Likud if indicted, with 24% opposed. The poll had a margin of error of 4 percentage points.

The emergence of Saar as an heir could reshuffle the deck, but challenging Netanyahu in Likud is a risky maneuver in a party that fiercely values loyalty and has had only four leaders in its 70-plus-year history.

Supporters of Israeli Prime Minister Benjamin Netanyahu gather outside his residence in Jerusalem, Thursday, Nov. 21, 2019. Israel's attorney general charged Netanyahu with fraud, breach of trust and accepting bribes in three different scandals. It is the first time a sitting Israeli prime minister has been charged with a crime. (AP Photo/Ariel Schalit)
Israel's Attorney General Avichai Mandelblit reads statement for media in Jerusalem, Thursday, Nov. 21, 2019. Mandelblit charged Netanyahu with fraud, breach of trust and accepting bribes in three different scandals. It is the first time a sitting Israeli prime minister has been charged with a crime. (AP Photo/Ariel Schalit)
Israeli Prime Minister Benjamin Netanyahu speaks during an extended faction meeting of the right-wing bloc members at the Knesset, in Jerusalem, Wednesday, Nov. 20, 2019. (AP Photo/Oded Balilty)
Israeli Prime Minister Benjamin Netanyahu speaks during an extended faction meeting of the right-wing bloc members at the Knesset, in Jerusalem, Wednesday, Nov. 20, 2019. (AP Photo/Oded Balilty)
Blue and White party leader Benny Gantz addresses media in Tel Aviv,Israel. Wednesday, Nov. 20, 2019. Gantz has failed to form a new government by a deadline, dashing his hopes of toppling the long-time Israeli prime minister Netanyahu and pushing the country closer toward an unprecedented third election in less than a year. (AP Photo/Oded Balilty)
Blue and White party leader Benny Gantz arrives to address media in Tel Aviv,Israel. Wednesday, Nov. 20, 2019. Gantz has failed to form a new government by a deadline, dashing his hopes of toppling the long-time Israeli prime minister Netanyahu and pushing the country closer toward an unprecedented third election in less than a year. (AP Photo/Oded Balilty)
Israel's Attorney General Avichai Mandelblit reads statement for media in Jerusalem, Thursday, Nov. 21, 2019. Mandelblit charged Netanyahu with fraud, breach of trust and accepting bribes in three different scandals. It is the first time a sitting Israeli prime minister has been charged with a crime. (AP Photo/Ariel Schalit)
Supporters of Israeli Prime Minister Benjamin Netanyahu gather outside his residence in Jerusalem, Thursday, Nov. 21, 2019. Israel's attorney general charged Netanyahu with fraud, breach of trust and accepting bribes in three different scandals. It is the first time a sitting Israeli prime minister has been charged with a crime. (AP Photo/Ariel Schalit)
Israel's Attorney General Avichai Mandelblit reads statement for media in Jerusalem, Thursday, Nov. 21, 2019. Mandelblit charged Netanyahu with fraud, breach of trust and accepting bribes in three different scandals. It is the first time a sitting Israeli prime minister has been charged with a crime. (AP Photo/Ariel Schalit)