Turkish Prime Minister Recep Tayyip Erdogan has achieved an unusual feat –angering both Israel and Iran, which warned it will ”respond” to a NATO radar installation in Turkey.

"If Turkey wants to move toward NATO and the interests of the West, the Islamic Republic will react in response to this move” of the North Atlantic alliance’s plan to place an early-warning radar system in Turkey, said Mohammad Karami Rad, a member of the Iran’s Parliamentary National Security and Foreign Policy Commission.

"We will never accept this approach and Iran’s foreign ministry is closely monitoring the possible installment of a NATO radar system in Turkey," he told the official Iran news agency IRNA.

He did not detail what response Iran would take.

Turkish Foreign Ministry official Selcuk Unal told journalists last week that the early warning system will be installed as part of an American and NATO program that would keep an electronic eye on missiles launched from Iran.

Iranian Foreign Ministry spokesman Ramin Mehmanparast said Tehran is concerned that Israel will gain significantly from the radar installation.

"Iran and Turkey are two friendly neighboring nations... and have the ability to fully preserve their own security without any foreign intervention," said foreign ministry deputy Hassan Ghashghavi.

"We believe that any kind of presence around our borders by countries from outside the region will not improve security in the region but will actually do the opposite," he added.

The rare criticism of Turkey by Iran comes at the same time Erdogan has thrown relations with Israel into a deep freeze, upsetting not only Israel but also the United States, which so far has not succeeded in calming him down.

A nationalist party in Turkey has accused Erdogan of worsening relations with Israel in order to divert attention from the proposed radar installation by NATO.

Erdogan broke previous diplomatic red lines this week following the disclosure of the findings in the Nations’ Palmer Report on last year’s flotilla clash between Israel Navy commandos and Turkish-based IHH terror activists.

Erdogan was incensed that the report said that Israel’s maritime embargo on Hamas-controlled is legal. He recalled the Turkish ambassador to Israel, reduced diplomatic ties to a third-tier level, suspended trade ties with Israeli government agencies, and said he has not ruled out a visit to Gaza when he tours Egypt later this month.

Turkey also has warned it will attack the army in Cyprus if the island allows the U.S.-based Noble Energy company to drill offshore for gas.