Iran has handed down death sentences to several nationals accused of being part of a CIA-trained spy network uncovered earlier this year, an official said on Monday amid a worsening crisis between the Islamic Republic and Western powers.

Seventeen people were arrested in all, a senior intelligence official told foreign media in Tehran on Monday. None of the suspects are dual nationals, according to the official, who declined to be identified and didn’t say how many members were sentenced to death.

The announcement marks a show of force by Iran at a time of turbulent ties with the West after the US withdrew from an 2015 nuclear accord with Iran and re-imposed crippling sanctions against it.

The friction was made worse by a diplomatic crisis between Iran and the UK, which seized an Iranian oil tanker in Gibraltar earlier this month, saying it carried oil bound for Syria in violation of United Nations sanctions. Iran responded by holding a British tanker in the Arabian Gulf on Friday.

The Intelligence Ministry has detected an uptick in US efforts to recruit spies in Iran since the election of President Donald Trump in 2016 and the appointment of Gina Haspel as director of the CIA last year, the official said.

The suspected spies were trained by the CIA to gather classified information from sensitive locations in Iran including military bases, nuclear facilities and economic centres.

The CIA lured recruits by promising residency and jobs in the US and safe passage out of Iran, setting up shell companies as a cover to approach and hire Iranians, the official said. Iran’s state-run television aired a program on Monday identifying the alleged members of the cell.