Image copyright Alamy Image caption Russia and Ukraine took to Twitter to argue over the origins of Anna Yaroslavna

Russia and Ukraine have long been at loggerheads over a whole range of issues.

Their latest feud appears to be over the origins of 11th Century French queen Anna Yaroslavna, also known as Anne of Kiev.

The quarrel spilled over to Twitter, bringing a Simpsons gif into the online fight.

On a visit to France earlier this week, Russian President Vladimir Putin referred to the historical figure as "Russian Anna". Ukrainian President Petro Poroshenko said it was an attempt by Putin to "steal for Russia's history".

Anne of Kiev was born in Kievan Rus - present-day Kiev - in 1024 and was the queen consort of Henry I of France.

Image copyright Twitter/@Ukraine

Ukraine's verified English-language Twitter account first tweeted a "history lesson" directed to Russia's Twitter account, suggesting that when Anne of Kiev was queen consort of France, Moscow was a birch forest.

Russia's verified account, run by the Ministry of Foreign Affairs, responded by saying Russia, Ukraine and Belarus "share the same historical heritage which should unite our nations" alongside an image of the Cathedral of St. Sophia, Novgorod, that was constructed around the same time.

An hour later, Ukraine reacted with a gif from The Simpsons showing a Russian official laughing while he changes his name plate from "Russia" to "Soviet Union".

Ukraine's account later called the exchange an "epic spat".

You might also like:

The Russian Ministry of Foreign Affairs also waded in, tweeting an image reading "Anne de Russie" in French.

While Ukrainians praised their country's online diplomacy with one Facebook user saying Russia was dealt a "heavy blow" on Twitter.

Image copyright Twitter/@Russia

A Ukrainian blogger added that he was "proud" of the "trolling" but one war veteran had a more measured response, saying that the "successes of today are more important and worthy of being discussed".

However, a satirical Russian Twitter account took to irony, writing up an alternative history: "Kiev is the capital of Russia. The Kievan princes were all citizens of Russia. Anna brought the tricolore to France, which was remodelled and turned into the French flag."

While another Russian user said: "According to Ukraine's leaders, Yaroslav the Wise and his daughter Anna were Ukrainians, because many centuries later, something called Ukraine appeared on the land where they lived."

Origins of other figures were brought into the debate, with Ukrainian Foreign Minister Pavlo Klimkin saying he would consider Russian poet Alexander Pushkin to be Ukrainian, as "his creative genius was on many occasions inspired by the Ukrainian Odessa and Crimea".

By the UGC and Social News team; Additional reporting by BBC Monitoring's Yaroslava Kiryukhina, Yuriy Martynenko and Adam Robinson