Prime Minister Benjamin Netanyahu canceled his trip to New York City for the United Nations’ annual General Assembly next week after falling short of securing a parliamentary majority in Israel’s second general election in five months, his office announced Wednesday.

Netanyahu, 69, the longest-serving leader in Israeli history, was seeking a fifth term in office, but faced a stiff challenge from Benny Gantz’s centrist Blue and White party.

Netanyahu’s office said Wednesday he will not be attending this year’s U. N. General Assembly (UNGA), an event he ordinarily uses to advance Israeli interests on the world stage, because of current “political circumstances,” but did not elaborate, The Times of Israel reported.

The trip’s cancellation came just hours after Israel’s national elections, in which Netanyahu failed to secure an outright victory in the polls and now taxing coalition talks are expected to follow.

Foreign Minister Israel Katz, a member of the ruling Likud party, will reportedly attend UNGA in Netanyahu’s place.

Netanyahu’s visit to the United States next week was supposed to include a meeting with President Trump, but the official said that meeting will no longer take place.

On Saturday, Trump said he was looking forward to meeting with Netanyahu after the elections in Israel to potentially discuss a possible U.S.-Israel security pact, but there is reportedly no word whether the meeting would be rescheduled.

When addressing reporters in Los Angeles on Wednesday afternoon, President Trump acknowledged he had not been informed on the latest developments with the Israeli elections but said, “Our relationship is with Israel.”

Initial results show Netanyahu’s conservative Likud party and Gantz’s centrist Blue and White party virtually deadlocked.

ISRAELI EXIT POLLS SHOW NETANYAHU SHORT OF MAJORITY IN YEAR'S SECOND ELECTION

Gantz’s centrist bloc, which could potentially include the Joint List of Arab parties, has a slight edge over Netanyahu and his religious and nationalist allies.

The Joint List was expected to win about a dozen seats in the 120-member assembly, coming third after the Blue and White party and the Likud party.

The increased turnout among Arab voters propelled the bloc to a strong showing at the polls and may have prevented Netanyahu from attaining the right-wing coalition he had desperately sought.

"There is no other prime minister who incited against us like Netanyahu," the leader of the Joint List, Ayman Odeh, told Israeli media. "There's a limit. The Arab citizens undoubtedly felt that they became a persecuted minority, an endangered minority."

Neither Netanyahu nor Gantz have enough support to form a government without the Yisrael Beitenu party led by former Netanyahu ally-turned-rival Avigdor Liberman, who has emerged as kingmaker. The Yisrael Beitenu party is expected to secure 9 seats.

Liberman said Wednesday he’ll insist upon a secular unity government between Netanyahu’s and Gantz’s parties, adding that is the “one and only option.”

Gantz, a former military chief, has ruled out sitting with a Netanyahu-led Likud at a time when the prime minister is expected to be indicted on corruption charges in the coming weeks, which could mark the end of Netanyahu’s more than a decade in power.

However, final results, which are expected on Thursday morning in Israel, could still swing toward Netanyahu.

Even though Netanyahu failed to secure enough support in Tuesday’s elections to form a new government with his right-wing political allies, he said he will seek to lead a ruling coalition with those supporters.

BENJAMIN NETANYAHU'S CAREER ON THE LINE AS ISRAEL VOTES IN REPEAT ELECTION

At a party meeting in Jerusalem on Wednesday Netanyahu said that he is against any government that “leans on the anti-Zionist Arab parties,” and said he would make “every effort to prevent a dangerous government like this.”

Tuesday’s elections came after Netanyahu failed to form a government in the allotted time frame and pushed through a vote to dissolve the Israeli parliament, calling for new elections rather than allowing Ganz the opportunity to form a governing coalition.

Once the official results are announced, Israel President Reuven Rivlin will select the candidate he believes has the best chance of forming a stable coalition. Rivlin is expected to consult with all parties in the coming days before making his decision.

The president reportedly has until October 2 to task a lawmaker with forming a government.

CLICK HERE FOR THE FOX NEWS APP

Rivlin’s choice will then have up to six weeks to assemble a government and if that person fails, the president can appoint another candidate, who will get up to four weeks.

Fox News’ Trey Yingst and The Associated Press contributed to this report.