DUBAI (Reuters) - A Saudi court on Tuesday sentenced 15 people to death for spying for the kingdom’s arch-adversary Iran, Saudi-owned media reported, a ruling that could heighten antagonism between the regional powers.

The Specialized Criminal Court in Riyadh sentenced 15 other defendants to prison terms ranging from six months to 25 years, and acquitted two of them, the Arabic-language al-Riyadh newspaper said on its website.

The defendants - comprising 30 Saudi Shi’ite Muslims, one Iranian and an Afghan - were detained in 2013 on charges of espionage for Iran and went on trial in February. Tuesday’s rulings are subject to appeal, and death sentences must go to the king for ratification.

Iranian Foreign Ministry spokesman Bahram Qasemi denied that any Iranian spying had occurred in Saudi Arabia. “Such accusations are baseless and serve political motives,” he was quoted as saying by the semi-official Tasnim news agency.

The trial was the first in recent memory in which Saudi citizens were accused of spying. It came at a time of increasing struggle between Saudi Arabia, the regional Sunni Muslim powerhouse, and Iran, a non-Arab Shi’ite theocracy, for influence in the Middle East.

In January, Saudi Arabia executed a prominent Shi’ite cleric convicted of involvement in the killing of policemen, prompting protesters to storm the Saudi Embassy in Tehran. Riyadh then broke off diplomatic relations.

Many of the 32 defendants were former employees of the Saudi defense and interior ministries, Saudi media said. They were accused of setting up a spy ring and passing sensitive military and security information to Iran in an effort to sabotage Saudi economic interests, undermine community cohesion and incite sectarian strife.

The charges included supporting protests in the Shi’ite-majority region of Qatif in Eastern Province, recruiting others for espionage, sending encrypted reports to Iranian intelligence via email and committing high treason against the king.

Among those arrested in 2013 were an elderly university professor, a paediatrician, a banker and two clerics.

Most were from al-Ahsa, a mixed Shi’ite and Sunni region that is home to around half the members of the kingdom’s minority Shi’ite community.

Saudi Arabia has blamed sporadic unrest among Shi’ites in Qatif on Iran, but never publicly presented evidence of a direct link between Tehran and those who took part in protests between 2011 and 2013. The Islamic Republic denies any involvement.

Shi’ites in Eastern Province say they face persistent discrimination affecting their ability to work, study and worship freely - accusations denied by Saudi authorities.