Extremist elements have taken over the country, Defense Minister Moshe Ya'alon warned on Friday morning as he explained his resignation from political life.

"This morning I told the prime minister that I'm resigning from the government and the Knesset and taking a break from political life," Ya'alon said at the IDF's military quarters in Tel Aviv. "I have no intention of leaving the public and political life, and in the future will return to compete for the national leadership of Israel."

"I saw before me the safety of Israel and its citizens in all of my acts and decisions, and the good of the country above all other considerations. This was so in security and professionals matters and in matters of values and rule of the law."

Earlier on Friday, Ya'alon wrote on Facebook that "I notified the prime minister this morning that following his conduct in the latest developments and in view of the lack of trust in him, I am resigning from the government and the Knesset and taking time out from political life."

Noting that he worked harmoniously with Prime Minister Benjamin Netanyahu for a long time, Ya'alon said in his speech that "unfortunately, I recently found myself in strong disagreement on moral and professional issues with the prime minister, a number of ministers and several MKs."

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

"I fought with all my might against attempts to harm the Supreme Court and Israel's justices, trends whose outcomes greatly harm the rule of law and could be disastrous for our country."

The latest confrontation between Netanyahu and Ya'alon, which took place at the beginning of the week, was over the public backing Ya'alon gave senior IDF officials to express their opinions. His remarks followed Netanyahu's criticism of comments made by IDF Deputy Chief of Staff Yair Golan on Holocaust Remembrance Day.

The rift between Ya'alon and significant parts of the Likud central committee and party voters widened over the past year over the obstacles the defense minister placed in front of efforts regarding construction in the settlements.

"The rupture between Netanyahu and Ya'alon is real and serious, not political spin. Netanyahu owes a lot to right-wing voters who marked Ya'alon as a red flag," a Likud source said.

"In general, Israeli society is a healthy society, and the majority of it is sane and aims for a Jewish, democratic and liberal country," Ya'alon said. "But to my great sorrow, extremist and dangerous elements have taken over Israel and the Likud Party and are shaking the foundations and threatening to hurt its residents."

"Sadly, senior politicians in the country have chosen the way of incitement and segregation of parts of Israeli society instead of unifying it and bringing it together. It is unbearable to me that we will be divided among us out of cynicism and lust for control, and I expressed my opinion on the matter more than once out of honest concern for the future of society in Israel and the future of the next generations."