TEL AVIV, Israel — Israel's defense minister officially stepped down Sunday, capping a tumultuous week that is expected to result in the replacement of the former military chief with an inexperienced hard-liner in the sensitive post.

Moshe Yaalon's departure cleared the way for Avigdor Lieberman, one of Israel's most polarizing politicians, to take over as defense chief.

Prime Minister Benjamin Netanyahu invited Lieberman's party, Yisrael Beitenu, into the government last week in a move meant to shore up his narrow governing majority. But Lieberman reportedly demanded the defense ministry as a condition, forcing Netanyahu to ask Yaalon to step aside.

Yaalon angrily announced his resignation Friday, saying the government has been taken over by “extremist and dangerous elements.”

Netanyahu and Lieberman were still negotiating their coalition agreement Sunday, and it was unclear when he would formally join the government.

Yaalon held a brief ceremony at Israel's military headquarters in Tel Aviv, where he was greeted by an honor guard and shook hands with the military leadership. After the ceremony, he was whisked away in a jeep.

Yaalon, like Netanyahu, is a security hawk who was deeply skeptical of peace prospects with the Palestinians and led the military through a 50-day war against Islamic militants in the Gaza Strip in 2014.

At times, he angered the U.S. by criticizing American peace initiatives in the region as naive or messianic. But he protected the military when it came under fire from ideologically driven hard-liners.

His departure leaves the Cabinet dominated by religious and ultranationalist ministers who oppose the establishment of a Palestinian state and have close ties to the West Bank settler movement. Lieberman himself is a West Bank settler.

In a three-decade political career, Lieberman has at times been Netanyahu's closest ally and at other times his rival.

While he is an experienced politician who has been foreign minister and held other top jobs, his security experience is limited. Yaalon is a former chief of the Israeli military, while Lieberman only had a brief, low-level career in the army.

Those close to Lieberman say he is more pragmatic and level-headed than he appears in public.

Speaking to his Cabinet on Sunday, Netanyahu said he was committed to pursuing peace with the Palestinians, in an apparent attempt to ease concerns over Lieberman's arrival.