The Iranian chess official said she began seeing the messages of support from American government officials soon after she said she was afraid of returning to her country.

An image of the official, Shohreh Bayat, appearing not to wear a hijab at a world chess tournament in China had circulated online and in Iranian media and she quickly went public with her fears that she would be arrested if she returned to Iran. It is against Iranian law for a woman to appear in public without a head scarf.

“No wonder Shohreh Bayat is afraid of returning to #Iran,” the United States Embassy in Lisbon said on Twitter on Jan. 24, about a week after her story began appearing in news outlets around the world. “Since the 1979 Islamic Revolution, women risk harsh prison sentences for violating the mandatory hijab law.”

Similar messages on the Twitter accounts of American embassies in Armenia and Madrid and the United States Consulate in Barcelona appeared around the same time.