Israel’s prime minister Benjamin Netanyahu has secured a landslide victory in his party’s primaries, shoring up support ahead of the country’s unprecedented third election in March.

Mr Netanyahu, who has led the Likud for 14 years, swept 41,792 votes, or 72.5 per cent, beating his challenger, veteran politician Gidon Saar who received just 15,885 votes, or 27.5 per cent.

The results galvanise the premier’s position within his party ahead of the spring vote, but will likely prolong Israel’s political deadlock.

Mr Netanyahu had sought to crush an internal rebellion within his right-wing party after his leadership had been shaken by corruption charges and after he twice failed to build a ruling coalition following two previous inconclusive general elections.

Mr Netanyahu’s chief rival Benny Gantz, who heads up the centrist Blue and White Party, had refused to form a national unity government with the Likud if Netanyahu remained prime minister, fearing he would be too distracted by the impending corruption trial.

The prime minister, who vehemently denies the graft charges against him, refused to back down and so was seeking to solidify support within his own ranks before the elections.

“A giant victory,” Mr Netanyahu tweeted, just over an hour after polls closed.

“Thanks to the members of Likud for the trust, support and love,” he said. “God willing, I will lead Likud to a big victory in the coming elections.”

In a tweet, Mr Saar congratulated him and said he would support the prime minister in the national election.

“I am absolutely comfortable with my decision to run,” he added. “Whoever isn’t ready to take a risk for the path he believes in will never win.”

Netanyahu rushed off stage as Israel intercepts rocket

Amid Israel’s worst political impasse rival, Mr Saar, a former education and interior minister, had managed to garner some support from a handful of Likud backbenchers who have said it is time for fresh leadership.

As people headed to the polls, Mr Saar told reporters that Israel needed “a new path ... to form a strong and stable government that will allow us to unite the people of Israel”.

He was widely expected to lose.

But Mr Netanyahu, Israel’s longest-serving prime minister, still fought a fierce battle, dismissing Mr Saar as inexperienced while talking up his own security credentials and diplomatic prowess.

Mr Netanyahu’s supporters, meanwhile, sought to paint Mr Saar as a backer of the corruption case and being part of what the prime minister calls a “political witch hunt” to force him from power.

The prime minister, who currently heads up a caretaker government, has also faced mounting criticism for his handling of the security crisis with Gaza.

Over the last year and a half, there have been several fierce cross-border exchanges of fire between militants in Gaza and Israeli’s security forces.

In fact, as the prime minister campaigned in the southern city of Ashkelon on Wednesday, he was forced to flee the stage when a rocket fired from Gaza set off sirens.

It was the second time he has been bundled off stage due to incoming fire – he was rushed to a rocket shelter in the nearby city of Ashdod in September.

Mr Gantz responded to the primary results, saying Blue and White must win the upcoming elections.

“It appears that the defendant Netanyahu, who is leading the State of Israel down a path of corruption, will continue to lead Likud,” he said.