Both countries were carved out of the Austro-Hungarian empire after its defeat alongside Germany in the First World War. And both were stripped of swathes of territory and millions of inhabitants under the 1919 Treaty of St Germain, concluded with Austria, and the Treaty of Trianon signed with Hungary the next year.
But a hundred years on, that upheaval resonates in very different ways in Vienna and Budapest, according to Oliver Rathkolb, director of Vienna University's Institute of Contemporary History.
“In a study a few years ago we asked people in the two countries if Saint Germain and Trianon still meant anything to them. We got two totally different results: In Austria, it had no importance, in contrast to Hungary,” Rathkolb told AFP.
“The myth of Trianon and the dismemberment of Greater Hungary has been promoted for internal political ends even in the communist era, and even more so after 1989,” he says.
Nationalist Prime Minister Viktor Orban has even risked the ire of neighbouring governments by cultivating Hungarian minorities on his country's borders and offering them Hungarian citizenship.
Even if many ethnic Hungarians in other countries “don't quite identify with Orban's strongman version of democracy, he is able to spin a national fairy-tale that resonates”, says Nandor Bardi, a historian of ethnic
minorities at the Hungarian Academy of Sciences.
According to Bardi, “it is no coincidence that he makes keynote speeches — for example the famed speech about moulding Hungary into an 'illiberal state' — in Tusnad in Transylvania,” a region of modern-day Romania that belonged to Hungary under the empire.
'Doctrines of victimhood'
Austria, though, has put its imperial past behind it and “has benefited from its status as a small, neutral country,” having joined the European Union but not NATO, Rathkolb says.
The key to understanding these two different approaches to history, according to Rathkolb, is grasping the distinct “doctrines of victimhood” the two countries developed during their very different experiences over the past century.
In Austria, “the myth of Saint-Germain became obsolete after 1945” when the country again faced defeat, this time as part of Nazi Germany.
After the war the country tried to distance itself from Germany by reinventing itself as the “Nazis' first victim” and trying to minimise Austrians' role in the atrocities of the Third Reich.
The Habsburg past also proved useful in marking out a distinctly Austrian identity, as well as being “a skilfully exploited tourist attraction,” with Emperor Franz Josef and his wife Elisabeth — also known under the moniker Sissi — turned into kitsch icons.
The emperor Franz Josef with his great-grandnephew Otto von Habsburg in 2014. Photo: Wikimedia Commons
Meanwhile Austria made the most of its neutral status during the Cold War, attracting the UN and several other major international organisations to open headquarters in Vienna.
However in Hungary, the myth of Trianon remains very much alive in the national subconscious and has been “skilfully revived by Orban” after his return to power in 2010.
He can now “easily mobilise the electorate” with a narrative which paints Hungary as having constantly been the victim of history: first under Trianon, then communism, then liberalism, and today because of allegedly EU-backed immigration, says Rathkolb.
Indeed, during this year's election campaign Orban claimed Brussels wanted to rob Hungarians of their country, “not with the stroke of a pen, as happened one hundred years ago at Trianon; now they want us to voluntarily hand our country over to others.”
By contrast, “Austria doesn't labour under its past role as a big power and the nostalgia for Franz-Josef and Sissi is superficial. But in Hungary the belief persists that it was the country most wronged by the events of
1919-20,” says Austrian political scientist Anton Pelinka.
Pan-German nationalism is still one strain of thought within the far-right Freedom Party (FPOe), currently in coalition with the centre-right.
Even though in recent years the party has had to distance itself from that ideology, it has recently taken a leaf from Orban's book in floating the idea of Austrian citizenship for the German- and Ladin-speaking minorities in the Italian province of South Tyrol, which was also part of the Habsburg empire.
But Rathkolb thinks that even “this suggestion lacks support and will probably end up quietly disappearing from the agenda”.