WASHINGTON (Reuters) - The U.S. State Department on Monday issued and then deleted a congratulatory message for an Oscar win by a prominent Iranian director who criticized President Donald Trump’s travel ban as “inhumane.”

89th Academy Awards - Oscars Backstage - Hollywood, California, U.S. - 26/02/17 - Anousheh Ansari and Firouz Naderi pose with the Oscar they accepted on behalf of Asghar Farhadi, who won the Best Foreign Language Film for "The Salesman". REUTERS/Lucas Jackson

The State Department’s official Persian-language Twitter account, @USAdarFarsi, tweeted congratulations to the Iranian people and Asghar Farhadi, director of “The Salesman,” after the movie won an Oscar for best foreign-language film on Sunday, according to screenshots of the message circulated on Twitter.

READ MORE TOP NEWS:

Tweeting accountant in spotlight over Oscar best picture blunder

For White Helmets leader, Oscar win a victory for Syrian people

Breakingviews: PwC might have seen Oscars mixup coming

Farhadi boycotted the Oscars ceremony to protest Trump’s January executive order that temporarily banned entry to the United States by Iranians and citizens of six other Muslim-majority countries, and issued a statement criticizing the order. The ban was blocked by federal courts, although the administration is working on a new order.

Farhadi chose two Iranian-Americans - a female engineer and a former NASA scientist - to represent him at the ceremony. Anousheh Ansari, an engineer who was the first female space tourist, read a statement on Farhadi’s behalf calling the travel ban “inhumane.”

“Dividing the world into the ‘us’ and ‘our enemies’ categories creates fear, a deceitful justification for aggression and war,” Ansari said, reading from Farhadi’s statement.

According to screenshots circulating on Twitter, the @USAdarFarsi account posted a message around 1 a.m. EST congratulating Farhadi on the award, which was Iran’s second Oscar victory. The tweet was then deleted, although it is unclear exactly when.

“A congratulatory tweet was posted,” a State Department spokeswoman said. “We later removed the post to avoid any misperception that the USG (U.S. government) endorsed the comments made in the acceptance speech.”

A second State Department official said the decision to delete the tweet was made within the department.

The @USAdarFarsi account, which launched in February 2011 and seeks to engage directly with Iranians, had previously tweeted messages about “The Salesman,” including on Jan. 24, when it noted its Academy Award nomination and sent best wishes to Farhadi.

That tweet, which is still online, was published days before Trump issued the travel ban that sparked Farhadi’s protest.

Farhadi also won an Oscar in 2012 in the same category for his film “A Separation.” In his acceptance speech that year, Farhadi referred to tensions at the time between Iran and the United States over Tehran’s nuclear program, and said the Iranian people “despise hostility and resentment.”