By Graeme Esson
BBC Scotland's news website
On the day Bob Geldof wanted a million people to travel to Edinburgh, the city's streets were instead taken over by hundreds of people who actually wanted to be 40 miles away.
One protester took his message to the line of police
Protesters began marching down Princes Street after being unable to get on buses to travel to the G8 Alternatives protest at Gleneagles.
Their demonstration eventually lasted more than five hours and caused disruption to numerous streets around the centre of Edinburgh.
But those involved stressed that it had remained a peaceful protest, despite a couple of potential flash points with police.
The seeds of the protest began in the city's Waterloo Place, where people had gathered to board buses bound for Gleneagles.
Some police officers had batons at the ready
About a dozen vehicles had already left by 0930 BST, when three fully-laden buses were held back.
About an hour later one of the vehicles finally tried to set off, only to find its path quickly blocked by a police van.
Some of the hundreds of demonstrators who were waiting for other buses then blocked the road and pleaded for the vehicles to be allowed to start their journey.
Their appeal proved successful and as other buses began to arrive it looked like the situation had been resolved.
However, when it emerged at about 1130 BST that the Gleneagles march had been cancelled - a decision which was later reversed - those still waiting decided to take things into their own hands.
Protester Martin Hurton said: "They have stopped us getting to Gleneagles so we are marching here.
"We have had peaceful protests at Faslane and Dungavel and we wanted the same again today.
"We have the right to get buses to Gleneagles for a peaceful protest. The police have stopped that and this is the result of that."
A number of people staged a sit-down protest at the foot of the Mound
The protest made its way peacefully and slowly along Princes Street, with the chant of "Whose streets? Our streets" ringing out at regular intervals.
Those on the impromptu march tried to entice those on the sidelines to join them, and by the time the protest stalled at the foot of the Mound the numbers had swelled to about 500.
There was confusion about the best way forward as one protester used a loudhaler to suggest that people make their way back to buses which were now waiting to take more people to Gleneagles.
After some debate a few people took that option and the rest continued their way along Princes Street.
Once the protest reached the west end the unplanned nature of the event began to become more apparent.
It was announced that the march would head to the Meadows, then the American Consulate, before it was decided to head back along Princes Street to where more buses were waiting.
The slow shuffle began again, with a more obvious police presence, before protesters were brought to a halt at the foot of the Mound once more.
Three of the organisers said they were heading off for negotiations on the way forward but never returned, with rumours of their arrest quickly spreading.
At one point police stopped protesters on the Royal Mile
This time the delay lasted for almost an hour, and hundreds of bystanders gathered on the Mound to watch proceedings and show their support.
A samba band also tried to encourage a carnival atmosphere, but the mood darkened when police moved in.
There was jostling as a line of English officers divided the protest group in two, pushing one section up the Mound.
Teenage sisters Heidi and Freya Walker found themselves at the head of the protest.
"We did not mean to be at the front, but we ended up getting pushed over with the other people," said Freya.
Heidi described the police operation as "heavy-handed", adding: "We definitely made our point."
Aengus Gladwin, 24, who had travelled from Southampton to protest against the G8, said: "People turning up at concerts like Live 8 is a perfectly good way to get the point across, but we need people on the streets as well."
Those taken off Princes Street held a brief sit-down protest, amid reminders to maintain a peaceful protest, before starting to move off up the Mound.
However, that did not signal the end of the protest.
Police were out in force for the march
The protesters regrouped at the bottom of Market Street, and when police vans prevented them making their way back onto Princes Street they headed up Cockburn Street.
There then began a game of cat-and-mouse with police, who had to run up the road to prevent protesters making their way along the Royal Mile.
The demonstrators, now numbering about 150, were briefly held at the top of North Bridge before being shepherded south.
As the intermittent drizzle turned into torrential rain the group was ushered into the Meadows, where many of the officers jumped back into their vans.
There was a smaller police presence as the group continued to walk on, eventually going back down the Mound once more.
The number of protesters had dwindled to about 100, but the police presence was stepped up as they returned to Princes Street.
Despite police warnings they began blocking the road again and walked back along to Waterloo Place - the spot where the march had began about five hours earlier.
The area was closed off by police on foot and in vans before the final protesters dispersed.
The Lothian and Borders force said there had been sporadic groups wandering along streets, but reported no damage, violence or injuries.
A spokesman said that around 18 people had been arrested during the day, mainly for offences involving public order.