Israeli Defence Minister Moshe Yaalon attends a news conference in Tel Aviv July 28, 2014. Reuters

JERUSALEM (Reuters) - 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 and which runs civil affairs in the occupied 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," a grim-faced Moshe Yaalon said in a televised statement at the defense headquarters in Tel Aviv.

"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 the national home and threatening harm to those in it," he said, in a hint he might defect from the party.

"In the future I will return to contend for Israel's national leadership," Yaalon added.

Netanyahu's office did not immediately respond to his comments.

Yaalon's departure could put a new dent in domestic and Western confidence in the Netanyahu government.

Yaalon, a former chief of Israel's armed forces, 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.

US commitment 'absolute'

An Egyptian official told Reuters on Thursday that Cairo was "shocked" at the prospect of Lieberman as Israeli defense minister. But Washington struck a more optimistic note.

"We appreciate Mr. Yaalon's leadership and partnership as defense minister and we look forward to working with his successor," U.S. State Department spokesman John Kirby said. "Our bonds of friendship are unbreakable and our commitment to the security of Israel remains absolute."

Netanyahu's offer of Yaalon'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.

Yaalon shares Netanyahu's dim views on the prospects for a long-term accord with the Palestinians. But they clashed this month over the trial of a soldier who shot dead a wounded Palestinian assailant, with Yaalon coming out against strident public support for the soldier while Netanyahu took a more circumspect position.

A poll aired by Israel's Channel 10 television on Thursday found that 51 percent of Israeli Jews saw Yaalon as best suited for defense minister, while 27 percent preferred Lieberman.

Zeev Elkin, a cabinet minister and Netanyahu confidant, told Israel's Army Radio Yaalon had instead been offered the foreign affairs portfolio but had declined.

(Writing by Dan Williams, editing by Gareth Jones)