Israel's defense minister, Moshe Yaalon, announced his resignation May 20, citing a lack of "trust" in Prime Minister Benjamin Netanyahu and the governing party. (The Washington Post)

Prime Minister Benjamin Netanyahu’s attempts to remake his governing coalition have set heads spinning, particularly the dumping of his well-regarded defense minister, to possibly bring aboard a polarizing maverick with few friends in Washington.

Definitely out: Defense Minister Moshe Yaalon, who resigned his post on Friday. On the way to the door, Yaalon blasted Netanyahu, saying he has lost confidence in the prime minister’s decision-making and morals.

Maybe in: Avigdor Lieberman. He is a former foreign minister and current leader of an ultra­nationalist political party built around the 1 million Russian-speaking immigrants to Israel.

He has pressed for Arab citizens of Israel to move to the West Bank and wants to implement the death penalty for terrorists. He also wants to increase pension payments for the Russian newcomers.

Israeli pundits previously had called the current Netanyahu government the most right-wing in the country’s history, but this new coalition, if formed, will take the title.

Netanyahu’s closed-door negotiations are ongoing, and the deal has not been struck. There also is not a lot of wiggle room. Netanyahu’s coalition holds a one-seat majority in parliament.

In a news conference Friday, Yaalon, a member of Netanyahu’s Likud party, warned that Israel was drifting dangerously toward extremism.

“I fought with all my might against manifestations of extremism, violence and racism in Israeli society, which are threatening its sturdiness and trickling into the armed forces, hurting it already,” he said.

Yaalon appeared to be referring to support by Israeli leaders for a combat medic who fatally shot a wounded Palestinian attacker as he lay on a street in Hebron, in the occupied West Bank.

Thousands of Israelis rallied in Tel Aviv and proclaimed the soldier a hero. Human rights activists called the shooting an execution. The killing was captured on video.

Israeli Defence Minister Moshe Yaalon announces his resignation during a press conference on May 20, 2016, in Tel Aviv. (Jack Guez/AFP/Getty Images)

Just a few days ago, it looked as if Netanyahu was about to strike a deal with the leader of the opposition in parliament, Isaac Herzog, who steers the center-left Labor Party.

The speculation was that Herzog would take the post of foreign minister and seek to resurrect peace talks with the Palestinians, with the support of Arab allies such as Egyptian President Abdel Fatah al-Sissi.

Then everything fell apart.

Yaalon’s departure comes as the Obama administration and Israel are locked in difficult talks over the future of U.S. military aid to its front-line Middle East ally.

Israel is nearing the end of a 10-year, $30 billion package — the most generous in U.S. history and more than double what any other nation gets — and Netanyahu wants the number to climb to $40 billion or more in the next decade.

Netanyahu has warned that if he doesn’t get what he seeks from the Obama White House, he is prepared to wait for the next administration.

With Yaalon’s abrupt and angry departure, the future of the deal is more unclear than ever.

Yaalon is deeply steeped in Israel’s defense culture. He is a retired general, a former chief of staff of the army and a past commander of commando units.

Lieberman, an immigrant from Moldova, served as a corporal in an artillery unit.

The Times of Israel called his service short and unimpressive: “His only noted physical confrontation appears to be two fist fights at Hebrew University with members of an Arab student group.”

Still, Israel has had other defense ministers without much military experience.

Yaalon, too, has tangled with U.S. officials in the past, famously deriding Secretary of State John F. Kerry as “obsessive” and “messianic” in his pursuit of a peace deal between Israel and the Palestinians, an effort that collapsed in the spring of 2014.

The State Department spokesman at the time called Yaalon’s comments “offensive and inappropriate, especially given all that the U.S. is doing to support Israel’s security needs.”

On Friday, State Department spokesman John Kirby said: “We appreciate Mr. Yaalon’s leadership and partnership as defense minister and we look forward to working with his successor.”

Kirby added, “Our bonds of friendship are unbreakable, and commitment to the security of Israel remains absolute.”

Yaalon has been a steady leader of Israel’s defense establishment, enjoying a cordial, frank, productive relationship with U.S. military brass, the White House security team and Defense Secretary Ashton B. Carter, according to appraisals by American diplomats.

Lieberman is another story. During his tenure as foreign minister, he was essentially persona non grata at the State Department. If Israel and the United States had anything to talk about, Netanyahu picked up the phone and spoke with then-Secretary of State Hillary Clinton.

In his first official trip to Washington in 2009, Lieberman and Clinton clashed over the continued construction of Jewish settlements in the West Bank, communities that the international community calls illegal and the United States considers illegitimate and an impediment to peace. Israel disputes this.

Lieberman lives on a settlement.

In a statement, the Palestinian Authority’s Foreign Ministry called Lieberman an “extremist” and said entry into the Netanyahu government would be “fresh proof that there is no real peace partner in Israel.”

During Obama’s two attempts to make peace between Israel and the Palestinians, Lieberman, even when he served as foreign minister, had no seat at the table.

Describing Lieberman’s tenure as foreign minister, Yuval Diskin, a columnist at Yedioth Ahronoth newspaper, wrote: “He mainly visited largely irrelevant countries around the world.”

Lieberman has his supporters. An Israeli official watching the negotiations to form a new coalition told The Washington Post, speaking on the condition of anonymity to describe inside dealings, that a populist tough guy like Lieberman is just the man to help broker a real peace with the Palestinians.

While it is uncertain whether Lieberman and his party will enter the Netanyahu government, one move appears certain.

With Yaalon’s departure, the next in line on the Likud list to join parliament is Yehuda Glick, a prominent activist who wants Jewish worshipers to be allowed to pray on the raised esplanade that Jews call the Temple Mount.

The same site is called the Noble Sanctuary by Muslims and holds al-Aqsa Mosque and the Dome of the Rock.

Glick survived an assassination attempt two years ago by a Palestinian gunman.

Recently, Glick told Israeli reporters that if he enters parliament, he will do his best to change the status quo on the Temple Mount — a position opposed by Netanyahu.

Incitement among Palestinians asserting that the Israelis wanted to let Jews pray at the Temple Mount was one of the sparks that began the most recent six months of stabbings and gun and vehicular attacks by Palestinians against Israeli soldiers and civilians.

Carol Morello in Brussels contributed to this report.