JERUSALEM (Reuters) - Israeli Prime Minister Benjamin Netanyahu said on Tuesday he saw "a real danger" he might lose next week's closely contested election and asserted that there was a worldwide effort to ensure such an outcome.

In what Israeli media called an unannounced visit to a rally north of Tel Aviv, Netanyahu entreated supporters to make sure he defeats rival Isaac Herzog of the left-of-center Zionist Union party by casting ballots in the March 17 vote.

"It's far from being certain, there's a real danger," the said the right-wing premier, who has been in office since 2009.

In footage of the event obtained by Reuters Television, Netanyahu said Herzog would seek to renew peace talks with Palestinians and negotiate about "dividing Jerusalem, giving back territory". He was alluding to his rival's promises to seek to revive negotiations that collapsed in April.

Israeli Army Radio earlier aired what it said were comments Netanyahu made on Monday to party activists in which he said "it is a very tight race. Nothing is guaranteed because there is a huge, worldwide effort to topple the Likud government".

The radio interpreted his remarks as referring to foreign funding for advocacy groups campaigning for a change in government in Israel.

Likud and the center-left Zionist Union are running neck-and-neck in opinion polls ahead of the March 17 ballot, with Netanyahu widely seen by political commentators as having a better chance of forming a governing coalition after the vote.

As election day approaches, "Netanyahu is feeling the pressure ... he is shooting in all directions", Herzog told Israel Radio.

Netanyahu received rousing applause in the U.S. Congress last week during a speech against a potential nuclear deal with Iran sought by President Barack Obama's administration.

But the visit came on the invitation of Republican leaders in Congress who did not consult the White House and Democratic legislators beforehand. Critics accused Netanyahu of intervening in U.S. politics, and the Republicans of trying to boost his re-election prospects.

(Reporting by Jeffrey Heller and Allyn Fisher-Ilan; Editing by Mark Heinrich)