DUBAI (Reuters) - Kuwait ordered the expulsion of the Iranian ambassador and 14 other diplomats for alleged links to a “spy and terror” cell, Iranian and Kuwaiti media reported on Thursday, worsening an unusual public dispute between the two countries.

Kuwait also told Iran’s cultural and military missions to shut down, following a court case that increased tensions between the Gulf Arab state and Tehran.

Iran responded to the expulsions by filing a complaint with the Kuwaiti charge d’affaires, the Iranian news agency ISNA said. ISNA also said Kuwait is allowing only four of 19 embassy staff to remain in the country. Some sources said those expelled were given 45 days to leave the country; others said 48 days.

The expulsions were an unusual move for Kuwait, which avoids conflict and has worked at keeping good relations with all the countries in the region, and whose ruling emir is a regional diplomatic broker. Analysts said they thought the expulsion of the ambassador was the first ever by Kuwait.

“It certainly marks a turnaround from the Emir’s outreach to Iran at the start of the year, when he hoped to set the parameters for a strategic dialogue to defuse tensions between the (Gulf Arabs) and Iran,” said Gulf expert Kristian Ulrichsen at the U.S.-based Baker Institute.

“Under the pressure of Saudi interventionist policies, and the baseless accusation of Iranian interference ... (Kuwait said) Alireza Enayati, the Iranian ambassador, must leave,” ISNA said.

Kuwait’s acting information minister, Sheikh Mohammad al-Mubarak al-Sabah, said in a statement that the move was taken in “accordance with diplomatic norms and in abidance with the Vienna conventions with regards to its relationship with the Islamic Republic of Iran.”

Saudi Arabia, which severed ties with Tehran last year over attacks by Iranian demonstrators on its missions in the Islamic Republic, welcomed the move.

“The Kingdom of Saudi Arabia fully supports the measures taken by brotherly state of Kuwait against the Iranian diplomatic mission...,” state news agency SPA quoted a foreign ministry statement as saying.

Last year, Kuwait convicted 23 men - one Iranian and the rest Kuwaiti - of spying for Iran and Lebanese Shi’ite Muslim group Hezbollah. That trial followed the discovery of guns and explosives in a raid on the so-called “Abdali cell” in 2015, which escalated sectarian tensions.

One person was sentenced to death; the rest to prison terms. Last month, Kuwait’s highest court overturned the death sentence and reduced some of the prison terms while increasing others.

Iran has denied any involvement in the case.

Kuwait, which has a large Shi’ite Muslim minority, sits in a difficult geographical position, close to two major regional powers and arch foes - mainly Shi’ite Iran and Sunni-ruled Saudi Arabia.

Apart from the diplomatic row with Iran, Kuwait has also been trying to mediate in the crisis involving Qatar. Some other Gulf states have imposed sanctions on Qatar, accusing it of supporting terrorism and having links to Tehran.