JERUSALEM (Reuters) - Israeli Prime Minister Benjamin Netanyahu on Monday avoided early elections, after a ruling coalition partner dropped a government with a slim parliamentary majority.

The change in the attitude of Naftali Bennett, the education minister and leader of the coalition's Jewish home party, surprised many analysts who expected his resignation as a protest after Netanyahu rejected his demand for defense minister and held the post for himself.

Bennett said the Jewish House party was withdrawing all its political demands and would stand next to Netanyahu, who holds the premiership for a fourth term.

Bennett added that he wanted to give Netanyahu a chance to steer the government's leadership back to the right and return Israel to victory, he said.

Netanyahu, the leader of the right-wing Likud party, has made last efforts to prevent the collapse of the government, which has won a majority by one seat in parliament since Avigdor Lieberman resigned as defense minister last week.

Lieberman announced his resignation in protest at what he called the government's leniency with Palestinian militants in the Gaza Strip amid escalating cross-border violence.

Security of Israel
In a televised speech, Bennett commented on Netanyahu's rejection of his request, saying, "There are things to gain and there are things to lose." The post of defense minister in Israel is the second most important ministerial portfolio in the country.

If Bennett had pulled his party out of the lean coalition, as the Jewish House Party officials threatened, Netanyahu would become the head of a minority government, making early elections likely. The date for the general elections is November next year.

In a speech late on Sunday, Netanyahu urged his coalition partners not to topple the government, citing unspecified security challenges and hinting at future Israeli action against its enemies.

"Together, we can overcome any challenge and ensure Israel's security," he said in remarks to the Knesset Foreign Affairs and Defense Committee.

Those statements left analysts in Israel's political and military affairs wondering whether Netanyahu really intended to launch new military action in Gaza or possibly against Hizbollah rocket sites in Lebanon, or whether he was using a political approach that would satisfy only his right-wing constituency.

A poll last week suggested Israelis were unhappy with the prime minister's dealings with Gaza, which led to a rare decline in Netanyahu's popularity.