JERUSALEM — When Prime Minister Benjamin Netanyahu made an unannounced visit this week to the Mahane Yehuda market here, he did not invite the local news media. Instead, selected scenes from his tour were filmed and the video released by his campaign.

The curious decision to not invite the press stemmed from security concerns, campaign aides said, but Israeli security officials told reporters they had not made the decision. Israeli political commentators concluded that even in this traditional stronghold of support for his conservative Likud Party, Mr. Netanyahu was worried about being heckled.

By Friday, with just days to go before the national elections, the reasons for Mr. Netanyahu’s concern were apparent. Most of the last polls to be published before the vote showed Likud trailing its main rival, the Zionist Union, a center-left slate headed by the Labor Party leader Isaac Herzog and his running mate, Tzipi Livni, the leader of a small centrist party.

Mr. Herzog and Ms. Livni have agreed to split the four-year term as prime minister if they win, with Mr. Herzog serving in the post for the first two years and Ms. Livni for the second.