JERUSALEM  Israeli Defense Minister Ehud Barak on Monday abruptly announced he was quitting politics, injecting new turmoil into the Israeli political system weeks ahead of general elections.

Barak, Israel’s most-decorated soldier and one-time prime minister, said he would stay on in his current post until a new government is formed after the Jan. 22 balloting.

His resignation could mean the departure of the most moderating influence on Prime Minister Benjamin Netanyahu, who holds a wide lead in polls and is expected to easily win re-election.

Barak, who heads a small centrist faction in parliament, often served as Netanyahu’s unofficial envoy to Washington to smooth over differences with the Obama White House.

Less than a week ago, Barak led an eight-day military offensive against the Hamas militant group that rules the Gaza Strip. The fighting, aimed at ending rocket fire from the Palestinian territory. ended in a fragile truce.

“I didn’t make this decision [to leave politics] without hesitating, but I made it wholeheartedly,” he said at a hastily arranged news conference, saying he had been wrestling with the decision for weeks.