Spain's Prime Minister Pedro Sánchez meets with Iranian chess player Sara Khadem in Madrid, Spain on January 25.
CNN  — 

Spain’s Prime Minister Pedro Sánchez says he’s been inspired by Iranian chess player Sara Khadem, who recently took part in an international tournament without a hijab.

According to Reuters, Khadem, also known as Sarasadat Khademalsharieh, has defected to Spain over fears of returning to Iran.

On Wednesday, Sánchez posted pictures on Twitter of the pair playing chess during a meeting in Madrid. Khadem is pictured not wearing a hijab.

“How much I have learned today from a woman who inspires me, the Women’s Chess Grandmaster Sara Khadem,” Sánchez tweeted.

“All my support to women athletes. Your example contributes to a better world.”

In December, Khadem appeared in photos shared by Iranian outlet Jamaran without her hijab, which is mandatory under Iran’s dress code, during her participation at the FIDE World Rapid and Blitz Chess Championships in Almaty, Kazakhstan.

Khadem, who is ranked the ninth best player in Iran, is one of a number of sportswomen to appear at a sporting event without a hijab since anti-government protests erupted in September, sparked by the death of Mahsa Amini.

The 22-year-old Kurdish-Iranian woman died in mid-September after being detained by the country’s morality police, allegedly for not abiding by the country’s conservative dress code, sparking outrage around a range of grievances with the regime.

In October, Iranian climber Elnaz Rekabi competed in South Korea without her mandatory hijab on, later saying it had fallen off accidentally. However, it is unclear whether Rekabi’s comments were made under duress.

In November, Iranian archer Parmida Ghasemi demonstrated her support for anti-government protests by removing her hijab during an awards ceremony in Tehran, later saying she did not notice it falling off.

Iran’s deputy sports minister Maryam Kazemipour said in November that athletes who acted against Islamic norms “regretted” their actions afterward and “are looking for an opportunity to make up for their mistake.”

In 2020, Iranian chess referee Shohreh Bayat was criticized in Iran for not wearing the appropriate headscarf at the Women’s World Chess Championship in China and Russia. She refused to bow to the regime’s pressure but, as a result, has not returned home out of fear of punishment.

In an interview with Spanish newspaper El País, Khadem explained her reason for not wearing a hijab in the tournament in December.

“To be honest, even before playing this tournament, I never wore a hijab,” she said.

“I mean, I only put it on for the cameras because I was representing Iran. Somehow, it didn’t feel good to not be myself, so I just decided not to do that anymore.”

CNN has reached out to Khadem via Instagram.

CNN’s Celine Alkhaldi and Matias Grez contributed reporting.