Istanbul: The US ambassador to Turkey “went blonde” this week in a post on Instagram that poked fun at the mayor of Ankara, Turkey’s capital, who had made sexist remarks about a US government spokeswoman on Twitter, calling her a “stupid blonde.”

Ambassador John R. Bass, who has dark hair, posted a digitally altered picture of himself with reddish-blonde hair on his Instagram account on Thursday. The caption said, “American diplomats: we’re all blonde.”

On Wednesday, the mayor, Melih Gokcek, posted a picture on his Twitter account of the Baltimore police forcibly subduing a looter during the recent unrest there. He criticised Marie Harf, a spokeswoman for the State Department, for her “silence” after she had chastised Turkey for its use of police force during antigovernment protests in 2013.

His Twitter post said, “Where are you, stupid blonde, who accused Turkish police of using disproportionate force?”

“Come on blonde, answer now,” Gokcek continued in another tweet.

Gokcek’s remarks, which aimed to show US hypocrisy even though there have been no accounts of widespread police brutality in Baltimore, immediately went viral on Twitter, attracting thousands of supportive messages from his more than 2.5 million followers.

In a news briefing in Washington on Wednesday, Harf said she would not dignify Gokcek’s insults with a response. But she emphasised that President Barack Obama had made extensive comments about the unrest in Baltimore, which was set off by the death of Freddie Gray, a black man who died of injuries he suffered while in police custody.

Gokcek, a close ally of President Recep Tayyip Erdogan of Turkey, is one of the most polarising figures in Turkish politics and regularly targets foreign news outlets and journalists on Twitter.