Israel’s defense minister resigned on Friday, saying the nation was being taken over by “extremist and dangerous elements” after Prime Minister Benjamin Netanyahu moved to replace him with a far-right politician in an effort to strengthen his coalition.

Political sources say Netanyahu has offered long-time rival Avigdor Lieberman the defense portfolio, a post crucial for a country on a perennial war footing. The Defense Ministry also runs civil affairs in the West Bank, where Palestinians struggling for statehood live in friction with Jewish settlers.

“To my great regret, I have recently found myself in difficult disputes over matters of principle and professionalism with the prime minister, a number of cabinet members and some lawmakers,” outgoing Defense Minister Moshe Ya’alon said, reading, grim-faced, from a statement at his Tel Aviv office.

“The State of Israel is patient and tolerant toward the weak among it and minorities … But to my great regret extremist and dangerous elements have overrun Israel as well as the Likud party, shaking up our home and threatening harm to those in it,” he said, hinting he might quit the ruling party.

“In the future I will return to contend for Israel’s national leadership,” he said.

Netanyahu rebuffed Ya’alon’s criticism.

“The reshuffle in portfolios did not result from a crisis in faith between us. It resulted from the need to expand the government so as to bring stability to the State of Israel given the great challenges it faces,” he said in a video statement.

Netanyahu, who doubles as foreign minister, added that he had offered the top diplomatic post to Ya’alon but was refused.

“I reckon that had (he) not been asked to leave the Defense Ministry, he would not have quit,” Netanyahu said, defending the Likud as a “liberal nationalist party” and arguing that a broader government could better pursue a peace strategy.

However, Ya’alon’s departure could put a new dent in domestic and Western confidence in the Netanyahu government.

A former chief of Israel’s armed forces, Ya’alon had shored up relations with the Pentagon that provided a counter-weight to Netanyahu’s policy feuds with U.S. President Barack Obama over peace talks with the Palestinians and Iran’s nuclear program.

By contrast, Lieberman - whose appointment has not yet been confirmed — is inexperienced militarily and famed for his past hawkish talk against Palestinians, Israel’s Arab minority and Egypt — an important regional security partner for Israel.

An Egyptian official told Reuters on Thursday that Cairo was “shocked” at the prospect of Lieberman as Israeli defense minister.

Washington struck a more optimistic note on Friday. While praising Ya’alon, U.S. State Department spokesman John Kirby said Washington looked forward to working with his successor.

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

Netanyahu’s offer of Ya’alon’s cabinet post to Lieberman emerged this week after talks failed on bringing center-left opposition leader Isaac Herzog into the government.

The inclusion of Lieberman’s Yisrael Beitenu party in the coalition, which has also yet to be confirmed, would give Netanyahu’s six-party coalition 67 of parliament’s 120 seats, up from its current razor-thin majority of 61.

Ya’alon’s resignation follows discord between him and Netanyahu over policy issues, most recently on whether Israel Defense officers should be permitted to express their personal opinions publicly. Netanyahu harshly condemned Deputy Chief of Staff Yair Golan’s drawing of parallels between Nazi Germany and Israeli society during a Holocaust commemoration ceremony earlier this month.

“If there’s something that frightens me about the memory of the Holocaust is the recognition of revolting processes that happened in Europe in general and in Germany in particular back then, 70, 80 and 90 years ago, and finding proof of their presence here, in our midst, in 2016,” Golan .

Ya’alon subsequently called on IDF officers to “continue to speak their mind.”

Lieberman’s prospective appointment provoked fierce opposition from left-wing and centrist politicians.

Yuval Diskin, a former head of the Israel Security Agency, or Shin Bet, wrote an Op-Ed that was published in Yediot Acharonot Friday saying that Lieberman’s appointment may be the “beginning of the end” of the State of Israel because it would encourage Jewish fundamentalists , according to Diskin, and place the defense establishment under the control of “an insecure prime minister and an inexperienced defense minister.” He said he would not trust them to use the army responsibly.

Diskin also revealed in his Op-Ed that Ya’alon disobeyed direct orders while serving as the head of the IDF Israeli Central Command in 1998, when Netanyahu was prime minister. Shin Bet was ordered to storm a building in which were two Hamas terrorists near Hebron. The IDF was ordered to keep away from the area to avoid escalation but Ya’alon sent troops anyway because he disagreed with the order, Diskin revealed.

Ya’alon and another senior officer told Diskin that “despite the decision of the defense minister and the chief of staff, they were sending the troops we required as backup. I was proud of their courage to take such a decision,” Diskin wrote.

With Ya’alon walking away from his seat in the Knesset representing Likud, stepping in to replace him will be Yehuda Glick, a U.S. native who leads a group that advocates for wider Jewish access to the Temple Mount.

In October 2014 he was seriously wounded in an attempted assassination at the Menachem Begin Center in Jerusalem by a Palestinian gunman. As a guide, he also leads groups of Jewish tours to the Temple Mount to earn his livelihood.