JERUSALEM — He is a right-wing nationalist who once served as chief of staff to Israeli Prime Minister Benjamin Netanyahu, with whom he shares a long political partnership.

These days, Avigdor Lieberman seems bent on bending Netanyahu to his will.

When Israelis go to the polls Tuesday for the second time this year, they will have Lieberman to thank or blame, since he is in the improbable position of having forced both elections and could ultimately be responsible for Netanyahu’s political demise. Polls show Netanyahu’s Likud Party and the opposition party led by former army Chief of Staff Benny Gantz in a dead heat, each far from the 61 parliamentary seats required to form a government.

Lieberman resigned as Netanyahu’s defense minister in late 2018, believing the prime minister had been too soft when he agreed to a cease-fire with the Palestinian militant group Hamas. That led Netanyahu to call early elections in April of this year. Six weeks later, Lieberman’s refusal to compromise with ultra-Orthodox Jewish parties prevented Netanyahu from forming the hard-right coalition he had banked on — and thrust Israel into its second consecutive campaign.

Because he stands up to right-wing religious Jews, Lieberman has become the unlikely hero of some on Israel’s left. “Everyone loves him now that he stood up to Netanyahu,” said Nurit Kedar, a documentary filmmaker who recently released a movie about Lieberman, “but he’s still an outsider. No one really knows him.”

Kedar called her movie “Lieber-man,” which she took from one of Lieberman’s early campaign ads, aimed at recent immigrants from the former Soviet Union: “Super-man — Nyet. Bat-man — Nyet. Lieber-man — Da.”

Burly and opaque, Lieberman retains a preternatural ability to infuriate Netanyahu.

Late on May 29, faced with an unmoving Lieberman, who would not budge regarding a controversial law on the draft of ultra-Orthodox men, Netanyahu conceded defeat in his efforts to form a new coalition government, while sputtering that Lieberman “is part of the left.”

The angry accusation produced laughter among reporters who cover Lieberman as a pillar of the Israeli right. He is known for advocating capital punishment for terrorists and proposing an oath of loyalty for Israel’s Arab citizens.

In its final editorial before the vote, the liberal daily Haaretz warned its readers that “contrary to Netanyahu’s lie, [Lieberman] is actually deep in the nationalist right. It’s not inconceivable that after the election, with a bundle of Knesset seats in his pocket, he’ll ‘remember’ this and join a Netanyahu government.”

Lieberman’s wild ride this year has hinged on the disaffection of Israel’s secular majority in the face of demands made by the ultra-religious minority, who have traditionally played a kingmaker role in Israeli coalition politics, gaining significant social and financial concessions. Although Netanyahu is not personally religious, he has built a close political partnership with the Orthodox community. Lieberman found a way to upend that alliance.

“He pulled a chess move on them,” said Gideon Rahat, a political science professor at the Hebrew University of Jerusalem. “He re-created himself as a centrist candidate by positioning himself on the right in terms of national security and on the left in terms of the religious right. No one else catered to those voters. And all he needs to win is to hold the center.”

Rahat, who is a senior fellow at the Israel Democracy Institute, pointed out an “absurdity” of Tuesday’s vote: With Netanyahu having moved his party sharply to the right, “Lieberman’s interests dovetail with those of Arab voters. The bigger the Arab turnout, pulling the center to the left, the better Lieberman’s chances of remaining the power broker.”

If President Trump reveals his long-anticipated plan for Israeli-Palestinian peace immediately after the Israeli elections, as some administration officials have foreseen, Lieberman, who defends the traditional American ideal of a two-state solution, could become a crucial partner.

Although U.S. Ambassador David Friedman says that the administration is “not ready to talk about a Palestinian state,” preferring the notion of an autonomous Palestinian territory, and Netanyahu recently promised to annex parts of the occupied West Bank, Lieberman speaks easily of a “future Palestinian state” even as he dismisses immediate prospects for peace.

“If you go back to the original United Nations resolution,” he said in an interview with The Times this summer, referring to the 1947 partition plan that created the state of Israel, “they used the words ‘Jewish and Arab states’ — the idea was to create two different states.”

Shelving the concept of any peace process as “an irrelevant expression in the Middle East,” Lieberman discussed Israel in wider, regional terms, and said that Trump’s vision for the volatile area, including an alliance between Israel and Saudi Arabia, is “the right approach.”

“No Muslim countries have peace, if you compare them with the U.S.-Canada border or with the open-border European Union, as I understand peace,” he said, expressing astonishment that the U.N. believes 600,000 Syrians have lost their lives in the decade-long civil war “and no one cares.”

“Today is the first time we have a real opportunity to change reality in the Middle East, starting with cooperation between Israel and the [Persian] Gulf states,” he said. “For them, today Israel is not a problem but a solution. They have natural resources and money. We have high tech, experience as the start-up nation, and strong security forces. This cooperation could change the whole Middle East.”

Lieberman, 61, born in Soviet Moldova, immigrated to Israel 40 years ago, practically penniless.

He became politically active while a Hebrew University student, joining the Likud and meteorically rising to become Netanyahu’s feared chief of staff.

Despite his reputation as an incendiary provocateur, he has not joined Netanyahu’s campaign of anti-Arab rhetoric, and people who have worked with Lieberman in his roles as minister of national infrastructure, minister of transportation, minister of strategic affairs, deputy prime minister, minister of foreign affairs and minister of defense argue that he is more a pragmatist than a racist ideologue.

Former U.S. Ambassador Daniel Shapiro, who shepherded the unsuccessful peace process advanced by then-Secretary of State John F. Kerry, said he “discovered that Lieberman wasn’t exactly what his public image would lead you to imagine.”

“He was not fundamentally opposed to what Kerry was trying to do,” said Shapiro, now a visiting fellow at Tel Aviv’s Institute for National Security Studies. “He is comfortable in his own skin. He doesn’t care what others think of him.”

Israel may awaken deadlocked on Wednesday, with Lieberman playing a decisive role.

Gantz has vowed he will not join a government including Netanyahu, who faces an early October judicial hearing ahead of expected indictments in three criminal cases.

Lieberman has no such compunctions. On election eve, his spokeswoman, Elina Bardach-Yalov, said that the Yisrael Beiteinu party would not sign a coalition agreement with any Arab-majority party, with the ultra-Orthodox, with the left-wing Meretz party or with what she called “Netanyahu’s messianic partners,” but added that Lieberman was untroubled by the looming criminal charges and hoped to re-create a Netanyahu government.

“You’re innocent until you’re found guilty,” she said, “even if you’re the prime minister.”

Tarnopolsky is a special correspondent.