Benjamin Netanyahu is poised to become the longest-serving prime minister in Israel's history after his dramatic win in Tuesday, breaking the record set by founding leader David Ben-Gurion. Despite final polls indicating an edge for Netanyahu’s center-left rival Isaac Herzog, the incumbent was able to win 30 seats in parliament for his right-wing Likud party, putting him on the path to a fourth term. If he serves a full four-year term, he will become the record holder, with almost 14 years in office. 

The surprise landslide came after a bruising campaign that became largely a referendum on Netanyahu’s performance. The weeks leading up to the March 17 vote saw the prime minister under fire on several fronts, including his record on social and economic issues and his tense relations with the United States, Israel’s most significant ally. How was Netanyahu able to turn things around to win yet another term? Below are three reasons the Israeli leader has been able to keep his political career alive:

1- Security: While the most visible issues during this election campaign were social and economic, like housing prices, the dominant, long-term concern for much of the Israeli public ultimately comes down to security.

Given the current regional climate in the Middle East, amid negotiations over Iran’s nuclear program and with the conflict raging in neighboring Syria, Netanyahu’s credentials on security matters gave him a leg up, according to Jonathan Schanzer, vice president for research at the Foundation for Defense of Democracies in Washington. “Israelis are looking across the region at these threats… [which] have softened the ground for a right-of-center coalition,” he said.

While Netanyahu was criticized for his almost singular focus on security issues throughout the campaign, most notably the threat from Iran, it worked. Netanyahu’s appeal on security issues also extends beyond his right-wing base, said Brent E. Sasley, an associate professor of political science at the University of Texas at Arlington. “There is a big contingent of centrist voters who tend to vote right on security issues, and Netanyahu was able to plug into them,” he said.

2- Herzog’s Campaign: The center-left Zionist Union may have pulled ahead in the polls in the final weeks, but the alliance still struggled to make a coherent case for itself, according to Sasley. “Herzog did not provide a serious alternative,” he said, arguing that while the challenger did harp on socio-economic issues important to voters, he was not able to make a sustained argument.

Herzog had pledged to make 300,000 apartments available to address the housing crisis but largely remained quiet on vital issues like settlements in the West Bank and the Israeli-Palestinian conflict.

“When the major opposition leader doesn't present a coherent alternative, then people can say, ‘Well, Netanyahu's been around, why take a chance on someone else?,’” said Sasley.

3- Netanyahu’s Last-Minute Tactics: With his polling numbers looking dismal heading into the final stretch, the Israeli leader took what appeared to be drastic measures to appeal to right-wing voters. On the eve of the election, Netanyahu announced that if re-elected, it would mean the end of Israel’s commitment to a two-state solution; he vowed never to allow for the establishment of a Palestinian state. The abrupt reversal on his long-stated support for the policy was followed by an election-day warning about the turnout of Arab voters, which he warned would endanger the right-wing government.

The hard-right shift apparently succeeding in convincing many supporters of smaller far-right parties to back Likud to fend off a center-left victory. “His last-minute plea for the right to support him … was a calculated move on his part,” said Schanzer. “Netanyahu is a master tactician when it comes to Israel’s complex system.”

Ultra-Orthodox parties like Shas, in turn, saw their numbers take a hit as many of their supporters shifted to Likud, apparently in response to Netanyahu’s warnings, according to Sasley. “He ran an effective fear campaign at the very end, and it ended up swaying people,” he said.