JERUSALEM — In the 2009 campaign that returned him to office, Prime Minister Benjamin Netanyahu of Israel called for the destruction of Hamas, the militant group that controls Gaza. But post-election, he settled for weakening and containing Hamas.

So it was a bit embarrassing for the prime minister when he had to be whisked off the stage at a campaign event Tuesday night in southern Israel for fear of incoming rocket fire — from Gaza.

By Wednesday, critics and commentators were having a field day, questioning Mr. Netanyahu’s sincerity about his latest election-eve vow, to annex the Jordan River valley.

“Netanyahu promised the public a dramatic statement, but the public was ultimately given dramatic footage instead,” Sima Kadmon, a political columnist with the popular Yediot Ahronot newspaper, wrote of video clips from the city of Ashdod that were widely shared on Israeli and Palestinian social media.