Turkey summoned on Thursday Sweden's ambassador over a video posted by a Kurdish group in Stockholm.
The video in question showed a puppet depicting Turkish President Recep Tayyip Erdogan swinging by his legs from a rope.
Sweden has been seeking Turkey's approval to join NATO. Ankara has demanded that Stockholm crack down on Kurdish militants. NATO accession is only possible if all members of the military alliance, Turkey included, approve.
What was the video?
The Kurdish Rojava Committee of Sweden compared Erdogan to Italian fascist dictator Benito Mussolini in a tweet.
Mussolini was hung upside down after his execution towards the end of World War II.
"History shows how dictators end up," the group wrote on Twitter. "It is time for Erdogan to resign. Take this chance and quit so that you don't end up hanging upside down on Taksim Square," referring to a major square in Istanbul.
Communications director for the Turkish government, Fahrettin Altun, condemned the group "in the strongest possible terms."
"We urge the Swedish authorities to take necessary steps against terrorist groups without further delay," Altun said.
Altun said that the video was proof that Stockholm had "not taken necessary steps against terrorism."
Swedish Foreign Minister Tobias Billstrom also condemned the video, saying that Stockholm "distances itself from threats and hatred against political representatives."
"Portraying a popularly elected president as being executed outside city hall is abhorrent."
Ankara demands perpetrators be identified
Turkish state broadcaster TRT reported that Sweden's ambassador was informed that Ankara strongly condemned what the government called a "heinous act."
"Our expectation that the perpetrators of the incident need to be identified, the necessary processes be carried out and Sweden uphold its promises was emphasised," a Turkish diplomatic source said.
Turkish officials said the act was contrary to an agreement Turkey had reached with Sweden and Finland under which the two countries promised to crack down on Kurdish militants.
Sweden and Finland, both known for their comparative willingness to welcome asylum seekers, have taken in many Kurdish people in recent decades fleeing the protracted conflict in southern Turkey and other areas in neighboring contries that some Kurds believe should be an independent country.
The Anadolu state news agency announced that Turkey's parliament speaker had revoked an invitation for his Swedish counterpart to visit Ankara next week.
The exchange comes less than a month after Foreign Minister Billstrom visited Turkey in a bid to get Ankara to support Sweden and Finland's NATO membership.