Builders are crashing about, foremen are barking down their phones, a lorry is disgorging building materials and no one seems to be noticing two men trespassing on their site. Security seems to be a little lax. But then it was on June 28th 1914 too. I am standing on the steps of Sarajevo's old town hall with Osman Topcagic, Bosnia's former ambassador to London and Brussels. If it had not been for what took place in this city in 1914, almost exactly a hundred years ago, who among us would be where we are today, or perhaps even have been born?

Trams clank by as Topcagic looks out from the top of the steps. For a moment he is quite still, staring across the river to where he grew up, perhaps thinking of how different things could have been. In 1914 his grandfather was a member of the city council. He would have been somewhere here as the Archduke Franz Ferdinand and his wife Sophie came up the stairs, one of the crush of local dignitaries welcoming the heir to the Habsburg Austro-Hungarian throne. In 2006 Topcagic showed the building to Otto von Habsburg, the pretender to the imperial crown, and then they went for lunch nearby; in 2011, Otto died peacefully in his sleep, aged 98. His great-uncle Franz Ferdinand's visit ended rather more memorably when he was shot dead by Gavrilo Princip. The rest is the history of the past hundred years. Here, on this street, we are at the ground zero of the 20th century.

The building, known as the Vijecnica, stands at the tip of the old Ottoman part of town. It is a fanciful Austro-Hungarian Moorish confection, built in 1892-94 in the course of the Habsburg-era redevelopment of Sarajevo. The Austro-Hungarians seized Bosnia and Hercegovina from the Ottomans in 1878 and ruled it until 1918. In 1914 the Vijecnica was the town hall; later it became the national library. As a student in the 1970s, in the heyday of Tito's Yugoslavia, Topcagic liked to come and study here with his friends. In 1980 Tito died and the country began to unravel. Then came the war, and in Bosnia, when they say "the war", they mean the one that began in March 1992. Five months later, struck by shells fired by Bosnian Serbs from the hills just above us, the Vijecnica went up in flames.

Soon afterwards it played host to an unforgettable scene when a cellist, Vedran Smailovic, led an anti-war protest by dressing up in white tie and tails, finding a perch in the rubble and playing Albinoni's Adagio in G Minor. The siege of Sarajevo and the war ground on nonetheless until 1995. For years afterwards the building remained an ugly reminder of the past, but the Sarajevo authorities slowly found the money to rebuild it, and while they were about it, install stone memorials noting that it had been burned down in 1992 by "Serbian criminals". But then the question began to creep up of how to handle 2014. What should the city do?

Years ago an idea circulated that all the western Balkan countries could celebrate joining the European Union on the centenary of the assassination, thus bringing Europe's long 20th century to a symbolic close. It was not to be, and especially not for Bosnia, because its people and politicians are divided by ethnicity today as in 1914. Its Serb, Croat and Bosniak (as Bosnian Muslims are now called) leaders cannot agree on what needs to be done to join the EU, let alone on the Princip question: was he a terrorist or a freedom fighter.

Like the builders , the diplomats, city officials, artists and historians began running around planning something. But what? As one friend put it, "what exactly are we supposed to celebrate?" Then someone had a brainwave. Sarajevo could be a European Capital of Culture for 2014. Friends were called in to lobby on its behalf. At the end of an interview with a senior European official, I said I just wanted to raise something else. He clapped his hand to his forehead. "Not you as well! We have already told them a thousand times it can't be done." Not being an EU member, Bosnia was ineligible for this coveted title and besides, when the Bosnians came up with the idea, it was already far too late for next year.

But in the end all was not lost. A momentum had built up, and now, with French help in particular, all sorts of events are going to be held to commemorate what happened here, which is why the builders are too busy to bother with us. They are in a rush because on June 28th 2014, in a nice touch, the Vienna Philharmonic will give a concert at the Vijecnica to mark its official reopening. It will also host an exhibition about the period. Roland Gilles, the French ambassador and a cycling enthusiast, tells me that the Tour de France of 1914 began on the day of the assassination. So this year he has fixed it for former champions, including Eddy Merckx, to come and race round Sarajevo and then lead a massive procession of yellow-jerseyed cyclists from the now-Serbian east of town to the now largely Bosniak centre. The event, like the concert, will be televised. "The whole world will see Sarajevo," Gilles says. "The idea is a message of peace and reconciliation which can come from here." Sarajevo is remembered for 1914 and the 1990s war, so now "the idea is to look ahead."

Yet within Bosnia, anything to do with Franz Ferdinand's assassination can be politicised, linked and related to both the second world war here and the war of the 1990s. When I meet Amra Madzarevic, the director of Sarajevo's museums, she talks about how Princip, his group and their sponsors in Serbia, "had similar ideas to Radovan Karadzic [the wartime leader of the Bosnian Serbs] and Slobodan Milosevic [then president of Serbia] who wanted to have a Greater Serbia". Karadzic is on trial for genocide and war crimes in The Hague now, and Milosevic died during his trial there in 2006. Still, Madzarevic wants to use the anniversary to change minds. "To show that we are known for other, good things, to prove we are not nationalistic. Some people in Europe have a very wrong picture of us. We don't want to interpret history, just to show it happened."

Madzarevic's office is up in an already beautifully restored Austro-Hungarian building which looks over a mixture of minarets and spires. On her desk is a model of the car that brought Franz Ferdinand and Sophie to the Vijecnica. "I bought it", she says, "as a souvenir at Artstetten"—the Austrian castle where the couple are buried and where their descendants still live. She went there to discuss the loan of certain items for the exhibition in the Vijecnica. The real car, and Franz Ferdinand's ripped and bloodstained jacket, are in the Military Historical Museum in Vienna, which has declined to lend them to Sarajevo; "well," Madzarevic says with a sigh, "I understand that." She sees an irony in the events planned for next year. "The war did not start in Sarajevo—only the spark was here." That is true, of course. Bosnia was not the reason for the first world war, it was simply that what happened here set in train a series of almost mechanical events that led to war.

There is a strange thing about the car, though, at which the opening shots of the first world war were fired. Its number plate was a 111 118. Read A for Anno and the figures as a date and you have the day the same war ended: 11/11/18.

Franz Ferdinand did not want to come to Sarajevo. He was a stiff and prickly man, but driven and determined. Against stout opposition, including from his uncle, the Emperor Franz Joseph, he had married Sophie, who, although a countess, was not officially regarded as being of high enough caste to be the wife of the heir to the throne. In their case love conquered all. To get permission to wed, he agreed that the marriage would be morganatic: Sophie would never be empress and their children could not be heirs to the imperial line.

In the years before 1914 there had already been a series of assassination attempts against Austro-Hungarian officials in Bosnia and in neighbouring Croatia. Franz Ferdinand, a family man, made clear in several remarks that he had a presentiment of disaster about the visit and of leaving his children fatherless. The police were monitoring angry young men who were joining radical anti-Habsburg groups, some of which came to be known as Mlada Bosna, or Young Bosnia. Some were ardent Serb nationalists, others were not. They wanted a Habsburg-free south Slav state—in effect, Yugoslavia.

In 1912, in the first Balkan war, Serbia and its allies (Greece, Montenegro and Bulgaria) had finally driven the Ottomans out of the Balkans. Serbia's reputation was riding high, especially among Serbs in Bosnia. During the Balkan wars Gavrilo Princip, one of these Bosnian Serb and nationalist students, tried to join the Serbian army but was rejected as unfit. He felt slighted, and he and his friends made connections not just with nationalists in Serbia, but with its intelligence service which overlapped with them.

Arguments over who exactly did what, who gave the orders and whether the Serbian government was ultimately guilty, have raged for a hundred years. And there have been suspicions that in certain belligerent Austrian military circles some people were happy to let Franz Ferdinand travel to his death, hence the virtually non-existent security. He had little regard for Serbia, but a clear understanding that the military idea of a "preventive war" was dangerous, would suck in Russia and then other countries, and lead to exactly what it did lead to.

Worried about the risks, Franz Ferdinand asked his aged uncle whether he really needed to go to Sarajevo. The emperor, who openly disliked his nephew, let it be understood that he should at least go to the military manoeuvres he was to observe just outside the city. So Franz Ferdinand obeyed. After a dinner on June 27th at which locals said the visit into town was risky, he again raised the possibility of cancelling the trip altogether. Bosnia's governor-general, Oskar Potoirek, was angry and insisted he go. So he gave in. No one seems to have noticed or cared that June 28th was Vidovdan, St Vitus Day, important to the Serbs because it is the anniversary of their defeat by the Ottomans at the Battle of Kosovo in 1389.

So the next morning Franz Ferdinand and Sophie got into the car. The route had been published and the crowds were waiting, among them six members of the plot. The convoy of cars proceeded down the Appel Quay, the straight riverside road now called Obala Kulin Ban, that leads directly to the Vijecnica. The only Bosniak member of the plot, Muhamed Mehmedbasic, froze when the car passed, but the next man, Nedeljko Cabrinovic, hurled two grenades.

The driver saw one arc towards him and accelerated. It bounced off the back of the car and exploded, injuring officials in one of the cars behind. Franz Ferdinand's car then zoomed past Schiller's delicatessen and arrived at the Vijecnica. There the mayor, who did not know what had happened, began an effusive speech about how Sarajevo welcomed him "with love and devotion", to which the archduke retorted: "What kind of devotion is this? I come to Sarajevo to be greeted with bombs. It is outrageous!" Then he went inside and probably saw a sight unlikely to lift his spirits: a statue of his uncle, Franz Joseph. He set about composing a telegram to him, to let him know he was still alive.

Franz Ferdinand now said he wanted to visit the injured. But to get to the hospital they would have to change the route to avoid the crowds. They got back in the car, drove back down the river and turned right at Schiller's. No one had told the driver that the route had changed. Potoirek shouted at the driver, who stopped and began to back up. Gavrilo Princip probably could not believe his luck: he was standing feet away from his stalled prey. He took out his pistol and fired twice.

As the British foreign secretary Sir Edward Grey was to say, the lamps now began going out all over Europe. Austria-Hungary issued an ultimatum against Serbia which it expected the Serbs to reject, thus giving the empire the excuse it needed to attack and punish it. When Serbia refused to accept one of the conditions, Austria-Hungary declared war, prompting Serbia's ally Russia to mobilise. Germany, allied to Austria-Hungary, viewed that as tantamount to a declaration of war, and so declared war on Russia. France, allied by treaty to Russia, was thus dragged into war with Germany, which then invaded Belgium, which in turn invoked a treaty from 1839 committing Britain to come to its defence. A month to the day after Princip fired his shots, war had begun.

In Sarajevo itself, straight after the murder, enraged Bosniaks and Croats rampaged through the streets and smashed up Serb shops and houses. Some of the Mlada Bosna group ran to the hills—to the Serbian village of Pale, 15km away, because one of them, Trifko Grabez, was the son of the priest there. A detail maybe, but one with a long shadow.

While war was ravaging Europe, the authorities in Sarajevo commissioned a monument, some ten metres high. It was erected on the other side of the road from Schiller's at the end of the Latin Bridge, so called because it once led to the Catholic quarter of the city. Between two columns was a large bronze medallion supported by putti. At the back was a pietà, a lamenting Virgin Mary and Christ. People could come here and light candles on what was, in effect, a shrine to the archduke and his wife. It was unveiled amid great fanfare on June 28th 1917. And the next year it came down again. The Austro-Hungarian Empire disintegrated, the Serbian army marched into town and the first Yugoslavia was proclaimed.

At first the monument went unreplaced. As Ivan Lovrenovic, author of "Bosnia: a Cultural History" (published in English in 2001), says of Princip and his colleagues: "Whether they were Serb or Yugoslav nationalists is not really clear, but what is important is that they did not consider themselves as fighters for Serbian interests. What proves this is that Serbs then did not really acknowledge them as their own."

In the 1920s, the place where it all began remained an unremarkable street corner in what was now a neglected, provincial Yugoslav town. But, as quickly as the wheel of history turns, interpretations change too. Yugoslavs, and especially Serbs, began having another look at Princip and Mlada Bosna. The assassin himself had only been 19 but in the Austro-Hungarian Empire the age of majority was 20, so he was spared execution by the very authorities he was attacking. He was sent to the fortress prison of Theresienstadt in Bohemia, where he died in 1918 of tuberculosis.

In 1940 the fortress, by then in Czechoslovakia, was turned into the infamous Nazi concentration camp for which the name is remembered. But, Princip's remains were no longer there. In 1920 they had been exhumed and returned to Sarajevo. It was not until 1930 that a plaque was prepared for the street corner, which read: "Princip proclaimed freedom on Vidovdan."

The rest of Europe was appalled. Winston Churchill thundered that the assassination had been an "infamy" and that Yugoslavs were lauding a terrorist, and so the authorities backed off. This was a private initiative, they said, nothing to do with them. But Princip and Mlada Bosna were not about to be sidelined from history, though. In 1936 a Belgrade architect, Aleksandar Deroko, was commissioned to build a chapel in Sarejevo for the bones of the plotters and in 1939, just before the world again plunged into war, they were reburied here.

For the first Yugoslavia the war began in 1941. Sarajevo was occupied by the Nazis on April 15th and Bosnia merged with the fascist Independent State of Croatia. The plaque to Princip was soon prised off the wall, because there was just time to get it to Hitler for his 52nd birthday, on April 20th.

With the end of the war in 1945 Princip was rediscovered and reinvented. To the new communist masters of Yugoslavia, Mlada Bosna could be cast in terms of Yugoslav nationalism and socialist revolution. They were, Lovrenovic says, "a gift from heaven and ideal heroes". The young Princip and his friends were anti-Habsburg rather than being interested in socialism itself, but never mind, history could be rewritten to fit the mood of the time.

Schiller's delicatessen was turned into a small museum. A distinguished artist, Vojo Dimitrijevic, was commissioned to create a monument. Instead of making a statue of a revolutionary hero, he simply placed two footprints in concrete where Princip had stood. Tourists loved it. They could stand in his steps and have their photo taken.

And then came the next war. Radovan Karadzic and the other Bosnian Serb leaders fled from Sarajevo up to Pale from where they besieged the city. The museum closed, the footprints vanished, probably destroyed by Bosniaks, and in the city children were taught that Princip was a terrorist and an evil Serb one at that. After the war ended in 1995, the museum remained shut for 12 years. Now called the Sarajevo 1878-1918 Museum, it describes, in neutral terms, what took place here. Outside is a new inscription on the wall, which says simply that from this spot Gavrilo Princip assassinated the Archduke Franz Ferdinand and his wife Sophie on June 28th 1914. A fact. No more, no less.

And there the story might have ended, had next year not been 2014. It is simple, one of my interlocutors tells me. The problem is that Princip is either a terrorist or a freedom fighter, but, he adds, if I quote him on this he will sue me. Why? Because in Bosnia, as the historian and former soldier Edin Radusic says, "the way history is taught now is about us in a sense, not about 1914. It is about Bosnia's problems now. In looking at 1914, historians of all three sides are trying to find the 'truth', but we have totally different results."

With the end of the war, Bosnia was divided in two. On one side is the Serb-dominated Republika Srpska, on the other the Federation which is predominantly Bosniak and Croat. In 1914, broadly speaking, Serbs, or rather those who were not part of the elite, looked favourably on Serbia, while Bosnian Croats and Bosniaks leaned towards the status quo. In 1878 Bosniaks had fought the invading infidel Habsburgs, but by 1913, as Muslim refugees from the Serbs and Montenegrins in the Balkan wars fled into Bosnia, they were reconciled to the idea that the Austrians were a better bet than the Serbs. For most Bosnian Croats, the fact that their monarchs were Catholics like them was a major consideration. The Yugoslav era tried to bury such divisions and historical memories. But, now, and with the anniversary, they are back. What you think of Princip is what you think of Bosnia today. And the problem is put bluntly by the historian Slobodan Sola. "Bosniaks want to attack Princip because he was a Serb and Serbs to defend him because he was a Serb. Politics is too present here."

Ivan Lovrenovic takes me to Deroko's chapel. It is not far from the centre, close to an intersection of busy roads. People who live in this city know the chapel, if you describe it, but have no idea why it was built. It is in the old Serbian cemetery close to the flyover. In socialist Yugoslavia it was ignored because it was a religious building; afterwards it was forgotten because it was a Serbian one. Lovrenovic himself has never been inside. "It is always closed," he says. But then a man comes out. Another goes in. We ask if we can go in. The answer is a categorical "no". There is a dead body in there, waiting for its funeral. "I’d be sacked if I let you in." Dispirited by this and the drizzle, we look at the memorial outside to Princip and the "Vidovdan Heroes" and leave. The black granite memorial stone, lightly vandalised during the siege, has been repaired or replaced. The memorial stone is topped by a large crucifix, and presumably the bones of Princip and the others are buried beneath it.

Down the hill, a few minutes’ walk from the scene of the assassination, is another fascinating part of the story which has long been buried. In the Art Gallery of Bosnia and Hercegovina, they are putting the final touches to an exhibition of Bosnian Serb artists. The gallery’s director, Strajo Krsmanovic, offers coffee and then leads us down into the depths. A big steel door opens, we descend into the bowels of the museum and then there it is: the central bronze medallion from the 1917 monument. After it was taken down, it was stored in the basement of the National Museum. It was moved after the second world war, and finally, in the 1970s, sent over to this basement. "It would be forgotten," says the curator Ivana Udovicic, wryly, "but it would be safe."

It is in perfect condition. Franz Ferdinand stares at us with piercing eyes, Sophie just looks sad or perhaps a bit blank. Krsmanovic talks about an idea that has been discussed in the newspapers, and which has provoked outrage amongst Serbs—that the monument should be rebuilt. The pietà is in another basement and the columns have somehow ended up being owned by someone in the little town of Trebinje. "I don’t know what happened to those plans," Krsmanovic shrugs, but he intends to show the bronze next year, along with the others, to a public that has never seen them.

The others?

Yes, around the corner the Franz Joseph statue that Franz Ferdinand probably saw just before he died is leaning against the wall, along with a bust of the emperor and a large bronze profile of him that was once mounted on a wall. Nearby is King Aleksandar, who presided over the first Yugoslavia until, in 1934, he too was felled by an assassin’s bullet. There is also a Yugoslav-era bust of a hero, retrieved by the police after being stolen by metal thieves; no one knows who it is.

Within all this history is another very Sarajevo story. The gallery was once a Jewish-owned department store, and these corridors housed its boiler and the coal to feed it. The Jews of Sarajevo mostly perished in the Holocaust. In 1992 a group of some 20 people taking shelter from the shelling lived down here, sleeping with Franz Ferdinand and the others. The story goes, Udovicic tells us, that a man died down here and a baby was born; no one knows if those tales are true or just myths.

Lovrenovic says the one thing he is frightened of is that the anniversary will bring about a wave of "Austro-nostalgia", which is a play on the more familiar "Yugo-nostalgia". Well, retorts Amer Kapetanovic, a government deputy minister who worked hard to get Sarajevo to do something next year, "What would be wrong with that? The Austro-Hungarian period brought schools, the rule of law and modern infrastructure, so what would be wrong with nostalgia for something better?"

This is not a view shared by Bosnia’s Serb leader Milorad Dodik. He has written to European leaders furiously denouncing plans to commemorate the anniversary in Sarajevo, arguing that the aim is to link the assassination and the siege and that what is being lined up is "an anti-Serb plan". He is thus organising a rival event. Next year there are elections in Bosnia and Dodik can enlist the freedom-fighter Princip as one of his team.

Up in Pale there is a monument I remember from the weeks on end I spent here during the siege of Sarajevo, two decades ago now. It commemorates 72 Serbs from the region who are buried there, victims of the Austro-Hungarians in 1914. Standing in the cool evening, Miomir Zekic, the grey-bearded priest of Pale, tells how, when the plotters fled here after the assassination, they were given shelter by different families. The police came and not only tracked them down but interned the families of those who had helped them; they are among the 72 who died, either in Pale or in the camps that year.

Zekic was the priest here during the siege of Sarajevo. In 2004 NATO troops, on a never clearly explained mission connected to the hunt for war criminals, seized him and his wife in the middle of the night and beat them up. He suggests we go and drink tea because, "when the weather changes, it hurts". For Zekic there is no doubt that "Princip was a hero of this country," by which, he adds, he means Yugoslavia. "Here"—by which he means among Bosnian Serbs—"he is seen as a hero because he struck a blow against the occupier."

As one of his predecessors in the job was the father of the plotter Grabez, I ask what he would have done if he had been the priest in 1914 and knew what his son was planning. His iPhone bursts into a peal of church bells: it’s an old Bosniak friend, calling to ask for some help for his child who is doing research on religion. As he talks to his Muslim friend, he is wreathed in smiles. But as he rings off, I remind him of the question which he would clearly rather not answer. "I don’t know," he says, looking uncomfortable. "I never thought about that."

Today many people from Pale work in the city they were besieging 20 years ago. They don’t have any problems there, he says. "We are a very strange people…" he begins to tell me. It is a long story; an old Bosnian story. "Each one of us writes their own history as they see fit, so everyone has their own truth." So, when it comes to whether Princip was a hero or a villain, when it comes to whether Sarajevo was attacked from Pale in 1992 or Pale was defending itself from Sarajevo, "God surely knows" whose version is true.

One hundred years on, Princip and Franz Ferdinand cannot rest in peace. In Bosnia at least and in 2014 they still have their roles to play, characters in a drama that directly links the events of 1914 with those of 1992 and politics today. "In people’s heads", a Bosnian Serb journalist told me a decade after the guns fell silent in 1995, "the war is not over."