Turks have reacted with undisguised glee to what many have described as an official – and certainly long overdue – confession from Stockholm that Sweden’s signature national dish is, in fact, Turkish.

“Those famous Swedish meatballs you get in Ikea are actually Turkish, admits Swedish government,” tweeted TRT World, Turkey’s publicly funded international television news channel.

“Swedish meatballs originally Turkish dish: Swedish government,” said the headline in Hürriyet Daily News, after Sweden’s official national Twitter account, @swedense, came clean last weekend.

“Swedish meatballs are actually based on a recipe King Charles XII brought home from Turkey in the early 18th century,” the Swedish account revealed abruptly and for no immediately apparent reason. “Let’s stick to the facts!”

Turkey’s Anadolu agency seized the chance to speak to Annie Mattsson, of the literature department at Uppsala University, who confirmed that after losing a key battle against Russia in 1709, Charles and the remnants of his army took refuge in what is now Moldova, then part of the Ottoman empire.

Dubbed “the Lion of the North” in a book by the French writer Voltaire and also known as the “Swedish Meteor” for his early military prowess, Charles, who acceded to the throne in 1697 at the age of 15, had bitten off rather more than he could chew by taking on Russia, and spent the following six years in exile in and around present-day Turkey.

Having acquired a taste for the local cuisine, he returned to Sweden in 1714 with the recipe not just for köfte, the spiced lamb and beef meatballs that in time became the Swedish staple köttbullar, but also for the popular stuffed cabbage dish now known in Sweden as kåldolmar.

Charles, who died in 1718 when he was shot in the head while attacking Danish-occupied Norway, is also considered responsible for importing and popularising the Turkish habit of drinking coffee, which became so widespread in Sweden in the later 18th century that King Gustav III briefly banned it.

In Turkey’s meatball capital, Inegöl, this week, a local chef, İbrahim Veysel, told the Doğan news agency it was an honour that the Turkish dish should have become “an example to different cuisines all over the world”.

Others were less happy. Serdar Çam, president of the Turkish Cooperation and Coordination Agency, complained that Ikea, which sells 2m meatballs a day in its in-store restaurants, should not be selling the dish as though it were Swedish.

Örjan, the forlorn – though presumably tongue-in-cheek – Swede currently curating the country’s @sweden tourism account, rotated every week, lamented that the news had robbed life of its meaning. “My whole life has been a lie,” he tweeted.

• This article was amended on 4 May 2018 to clarify that King Charles XII was dubbed “the Lion of the North” in a book by Voltaire.

