BUDAPEST, Hungary — Israeli Prime Minister Benjamin Netanyahu was caught Wednesday by a live microphone railing against the European Union’s “crazy” insistence on resolving the Israeli-Palestinian conflict as a precondition for closer ties with the 28-nation bloc, and trumpeting Israel as essential to its prosperity and survival.

Netanyahu was meeting with leaders of Poland, Hungary, the Czech Republic and Slovakia at a regional summit. Netanyahu was discussing Iran, Syria, the Islamic State group, and EU-Israel relations when some of his comments — and those of other leaders at the meeting closed to the media — were accidentally broadcast to journalists in another room covering the conference.

Netanyahu also made a rare public admission that Israel has struck Iranian arms convoys in Syria bound for Hezbollah “dozens and dozens of times.”

The Israeli premier was overheard blasting the European Union’s approach to Israel, saying “it’s crazy. I think it’s actually crazy” that the EU maintains that resolving the Israeli-Palestinian conflict must come before closer trade ties.

“There is no logic here. Europe is undermining its security by undermining Israel. Europe is undermining its progress by undermining the connection with Israeli innovation because of a crazy attempt to create conditions (for peace with the Palestinians),” said Netanyahu.

European ties with Israel would determine whether the 28-member union would “live and thrive or shrivel and disappear,” he added.

EU-Israel relations have been tense for years, with Jerusalem feeling that Brussels is targeting its policies far too much while being too soft on the Palestinians. While the EU is the main trading partner for Israel, frictions have persisted. Relations took a dive in November 2015 after Israel derided a decision by the bloc to label products made in Jewish settlements in the West Bank.

The EU doesn’t recognize Israeli sovereignty over territories it captured in the 1967 Mideast war, including the West Bank and east Jerusalem, where the Palestinians hope to establish a state. It has been a vocal critic of Israel’s settlement construction and has adopted measures mandating the labeling of goods produced in West Bank settlements.

“The European Union is the only association of countries in the world that conditions the relations with Israel — that produces technology in every area — on political conditions. The only ones. Nobody does it,” Netanyahu said, citing Russia, China and India’s willingness to do business with Israel despite politics.

Netanyahu has pushed for closer trade ties with India and China in recent years. Earlier this month, Indian Prime Minister Narendra Modi paid a state visit to Israel, during which the two countries signed a number of trade agreements cementing increasingly warm relations.

During statements to the media after their meeting, Orban shared Netanyahu’s view on the EU’s relations with Israel, calling for a more rational approach with “significantly better ties” and less criticism of Israel.

“The EU should value the efforts made by the state of Israel for stability in the region,” Orban said. “This is of interest not only for Israel but for Europe, too, as it protects us from more and more migrant invasions.”

“The EU’s relations with Israel are not rational enough and need to be repaired,” Orban added. “We’d like relations between the EU and Israel to be characterized by rationality. Instead of criticizing Israel, we should open the door to cooperation with Israel.”

Orban’s comments on Israel were in line with his similar views on countries like Turkey, Russia and China, where he also has chosen to emphasize improving ties and economic relations without delving, for example, into human rights issues.

Orban said the four Central European countries in the so-called Visegrad Group had accepted Netanyahu’s invitation to hold an upcoming meeting in Israel. Hungary holds the rotating presidency of the Visegrad Group until June 2018.