Ann Linde, left, Sweden's minister for European Union affairs and trade, and Shahindokht Molaverdi, Iran's vice president for women and family affairs, sign documents at Saadabad Palace in Tehran on Feb. 11. (Ebrahim Noroozi/AP)

Over the weekend, Prime Minister Stefan Lofven led a Swedish delegation to Iran. Lofven was received warmly by the Islamic Republic's political elite — Supreme Leader Ali Khamenei tweeted positively about his meeting with Lofven, adding that Sweden had a “good reputation” in Iran — and the two countries agreed upon a number of trade-related deals.

Back home, however, coverage of the Swedish government delegation's trip to Tehran has focused on something else. As Sweden's media noted Monday, a number of female officials who joined the trip, including Trade Minister Ann Linde, chose to wear Islamic headscarves while in Iran.

According to Expressen newspaper, there were 11 women on the trip out of 15 total in the Swedish delegation. The women were photographed wearing headscarves “almost all of the time” they were in Iran, with the exception of a number of events that took place at the Swedish Embassy.

By law, women are required to cover their hair and wear loose-fitting clothes when they appear in public in Iran, a country governed by a conservative Islamic elite. Many choose to wear loose-fitting hijabs, like the one worn by Linde in the picture above.

These rules require international visitors to dress modestly even if they are only in the country for a short time.

Lofven's Swedish government describes itself as a “feminist government,” and it has spoken of the need for a “feminist” foreign policy. Hillel Neuer, executive director of U.N. Watch, a human rights group and frequent critic of Iran , noted this apparent contradiction in a tweet shared Sunday night.

Masih Alinejad, a journalist and activist who started a Facebook page that invited Iranian women to share photographs of themselves without a hijab, also criticized the Swedish delegation.

“By actually complying with the directives of the Islamic Republic, Western women legitimize the compulsory hijab law,” Alinejad wrote on Facebook. “This is a discriminatory law and it's not an internal matter when the Islamic Republic forces all non-Iranian women to wear hijab as well.”

Alinejad later shared to Facebook a recent image of Sweden's deputy prime minister Isabella Lovin signing a document with an all-female staff behind her. That image recently went viral, as many viewed it as a criticism of President Trump's abortion policies. “Trump's words on women are worthy of condemnation; so are the discriminatory laws in Iran,” Alinejad wrote.

Speaking to Expressen, Linde said she had not wanted to wear a headscarf. “But it is law in Iran that women must wear the veil. One can hardly come here and break the laws,” she explained.

Other Swedish politicians were more critical. Jan Björklund, leader of the opposition Liberals party, told Aftonbladet newspaper that the headscarf is “a symbol of oppression for women in Iran” and that the Swedish government should have demanded that Linde and other female members of the delegation be exempted from wearing it.

Iran's rules on female attire often draw the ire of international visitors — just last year, U.S. chess star Nazi Paikidze made waves after refusing to travel to Iran to play in the world championships because she would not wear a hijab. For female politicians, it represents a bigger challenge, however, as flouting the rules or refusing to travel to Iran could damage relations with the country.

Almost all female politicians who visit Iran cover their hair when they appear in public, but in some cases that has not stopped criticism. Marietje Schaake, a Dutch member of the European Parliament, was criticized by Iranian conservatives for wearing relatively tight clothes and a headscarf that did not cover her neck during a visit to the country in 2015.

The year before that, Italy's then foreign minister, Emma Bonino, was reported to have briefly not worn a headscarf after arriving in the country, which resulted in a back and forth with the conservative Iranian press.

Questions over Islamic attire on diplomatic visits are not limited to Iran. In 2015, first lady Michelle Obama was pictured without a headscarf in Saudi Arabia, where conservative religious dress is customary but not required by law for foreigners. While other female dignitaries visiting Saudi Arabia in the past had also chosen to not cover their hair, Obama's attire sparked criticism on social media from a small but vocal group of Saudi conservatives.

Linde told Aftonbladet that she will “of course” not be wearing a veil when she visits Saudi Arabia next month.

More on WorldViews

Some people seem to think this photo of Sweden’s deputy leader is trolling Trump

Sweden’s unsent letter to a President-elect Hillary Clinton: ‘It is a milestone for the world’

Sweden’s subtly radical ‘feminist’ foreign policy is causing a stir