When Europe’s top diplomat arrived at the Iranian president’s inauguration on Saturday, it was a clear sign of commitment to better relations, even as the Trump White House has urged allies to isolate Iran.

But by the end of the ceremony, Federica Mogherini, the European Union’s foreign policy chief, would land at the center of a much different controversy, one that involved … selfies?

As attendees filed out of the parliament building, where President Hassan Rouhani had been sworn in for a second term, a crowd formed around Mogherini on the floor of the assembly. Dressed in suits and clerical robes — and nearly all wielding cellphones — more than a dozen Iranian lawmakers cheerfully snapped photos of the Italian Mogherini, who was wearing a checkered headscarf. One parliamentarian, giddy in a blue suit, leaned over the seats for the perfect angle for his selfie.

It was a lighthearted moment and one that spoke to Mogherini’s local celebrity as a diplomat who has forged ties with Rouhani’s government and helped open Iran up to the world.

But photos of the incident soon hit the local press, and then came the condemnations — and the ridicule.

“Dear MPs, thank you for disgracing 80 million people,” one Twitter user wrote, referring to the Iranian population.

Most of the criticism centered on the lack of decorum — behavior that is normally frowned upon in Iran’s conservative society. But the country’s hardliners also saw something more nefarious: Iranians “humiliating” themselves in front of the West, which for them remains an archenemy.

“Those who are supposed to defend the rights of the nation against the enemy queue up to snap photos in a humiliating way with the violators,” the conservative Kayhan newspaper wrote in an editorial Monday, AFP reported.

The semi-official Fars News Agency also tweeted that the photo-snapping incident was “strange.” Lawmaker Alireza Salimi called the episode “self-surrender to the West,” the BBC reported, and others called for an inquiry into the parliamentarians’ behavior.

But while officials fretted over the incident, Iranians on social media saw the humor in it all.

One Twitter user posted a photo comparing the parliamentarians' rush to snap pictures of Mogherini with a scene from the movie "Malena," in which mobs of men clamor to light actress Monica Belucci’s cigarette.

“Close enough,” the user said of the similarities.

Another meme juxtaposed the lawmakers around Mogherini with an image of the seven dwarves from the Walt Disney animation "Snow White,” crowding around Snow's bed.

Others showed lawmakers photo-shopped onto motorcycles, doing stunts to impress the diplomat. One showed an image of a lawmaker pleading for a selfie for his Telegram profile photo. Telegram, an encrypted messaging app, is extremely popular in Iran, including among government officials.

MP Ahmad Mazani tried to explain his colleagues' enthusiasm for Mogherini, who was also there for bilateral talks with Iran’s foreign minister. The attendees, the reformist cleric said on Twitter, had been banned from interacting with special guests during the ceremony.

“Shame and embarrassment,” another user replied.