Two Iranian poets are facing 99 lashes each for shaking hands with people of the opposite sex in one of the latest examples of harsh punishments meted out against writers and artists by Iran’s judiciary, according to human rights advocates.

The poets, Fatemeh Ekhtesari and Mehdi Musavi, have also both been sentenced to years in prison for “insulting the sacred” in their writings, a decision slammed by freedom of expression activists.

“Ekhtesari and Musavi’s arrests and convictions are a travesty of justice, and send a chill over the already beleaguered creative community in Iran,” Karin Deutsch Karlekar, director of Free Expression Programs at PEN American Center, said in a statement earlier this month.

Their cases highlight the contrast between the moderate image projected abroad by Iranian President Hassan Rouhani and the hardline approach to human rights pursued by authorities inside Iran.

Confessions reportedly made under duress

Many Americans are familiar with Iran’s detention of Washington Post reporter Jason Rezaian, who’s been kept behind bars for more than a year on espionage charges. The newspaper denounced a recent court decision to convict Rezaian, who holds dual Iranian and American citizenship, as “an outrageous injustice.”

But other Iranian writers who are less well known in the West have fallen foul of Iranian authorities, according to rights groups.

Earlier this month, Ekhtesari and Musavi, who touched on social issues in their work, received prison sentences of 11½ and 9 years respectively for convictions based on confessions extracted under duress, according to PEN. Both poets legally published books that received approval from the Ministry of Islamic Guidance, the group said.

The flogging sentences came after Ekhtesari admitted to shaking hands with male participants at a poetry event in Sweden, PEN said. Shaking hands with a member of the opposite sex who isn’t an immediate relation is considered an “illegitimate sexual relationship short of adultery” in Iran, it said.

A spokesman for the Iranian judiciary declined to comment on the poets’ cases, which haven’t been covered in the country’s state media.

‘A security state’

A filmmaker, Kayvan Karimi, was recently sentenced to six years in prison and 223 lashes on similar charges as the poets’, according to the International Campaign for Human Rights in Iran.

PEN also mentioned convictions in recent months of the writer and television producer Mostafa Azizi and the cartoonist Atena Farghadani.

“Hardliners aren’t just going after political activists, they are determined to stamp out any social or cultural expression with which they disagree,” said Hadi Ghaemi, executive director of the International Campaign for Human Rights in Iran, which is based in New York.

Rouhani is the public face of the Iranian government that agreed a landmark nuclear deal with world powers in July. But officials and law enforcement agencies acting with the support of Supreme Leader Ayatollah Ali Khamenei “have worked as one to impose a security state in which dissenting views of any type are considered national security threats and prosecuted as such,” the campaign said.

As Rouhani prepared to make his address to the U.N. General Assembly last month, the Committee to Protect Journalists detailed Iran’s grim record on media freedoms.

“Iran has ranked among the world’s worst jailers of the press every year since 2009,” the group said. In the committee’s most recent census, Iran was found to be holding at least 30 journalists in jail, the second highest number worldwide behind China.