Prime Minister Benjamin Netanyahu on Wednesday canceled a visit to the United Nations General Assembly in New York next week amid political uncertainty in Israel, where he appeared to fall short of a government majority in national elections.

With more than 90 percent of the votes counted, Netanyahu's decade-long grip on power appeared to be slipping. His center-right Likud party was expected to win 31 seats, while its main rival, the centrist Blue and White party, was pulling ahead with 32 seats, according to the Central Election Committee.

That could give his rival, Blue and White leader Benny Gantz, the first chance to form a new government, if he can put together a coalition with other parties. But it's not clear whether Gantz will join with the Likud party if Netanyahu continues to be its leader.

Both parties appeared set to fall short of the 61 seats needed to form a governing coalition in the 120-seat Parliament, known as the Knesset.

Netanyahu, a close ally of President Donald Trump, has participated in the U.N. General Assembly's main debate every year, except one, since he rose to power in 2009, according to The Jerusalem Post. In a notable address to the General Assembly in 2012, Netanyahu drew a red line across a cartoon diagram of a bomb, an attempt to illustrate how close he claimed Iran was to developing a nuclear weapon.

Amid reports Wednesday afternoon that Netanyahu had canceled his trip to the General Assembly, an Israeli government official told NBC News: "Due to political circumstances, the prime minister is not traveling to UNGA."

Netanyahu was slated to speak next Thursday, just three slots behind Palestinian President Mahmoud Abbas, according to the General Assembly schedule. He was also expected to meet with Trump on the sidelines of the gathering.

Yisrael Katz, Netanyahu's foreign minister, will speak at the U.N. in the prime minister's place, according to The Jerusalem Post.

Trump, asked by reporters Wednesday afternoon if he had spoken to Netanyahu since the election, said he had not, adding: "Those results are coming in and it's very close. Everybody knew it's going to be very close. We'll see what happens."

He then appeared to distance himself from the Israeli leader, saying, "Look, our relationship is with Israel. We'll see what happens."

The stakes are high for Netanyahu, who could potentially be indicted in three corruption cases. If he remains prime minister, Netanyahu may be able to pass legislation that would grant him immunity. But if he loses he may have to appear in court and even face time in jail.

The result could also have huge implications for the Middle East at a time of renewed tensions between the United States and Iran.

Gantz, a former army chief of staff, campaigned on a promise of clean government and social harmony. He has called for pursuing peace with Palestinians while maintaining Israeli security.