An Oxford University academic who penetrated London's secret underground tunnels and scaled its tallest skyscrapers for a geography PhD has been spared a possible jail sentence, in a qualified victory for academic freedom.

Dr Bradley Garrett, a researcher at the school of geography, had joined a group of "place hackers" who surreptitiously explore the off-limits corners of Britain's towns and cities. He was charged with conspiring to commit criminal damage during sorties into disused London Underground tunnels and stations such as Aldwych.

But after growing outrage from academic colleagues who considered the prosecution a fundamental breach of academic liberty, his trial has concluded in a conditional discharge.

The 'place hackers' surreptitiously explore the off-limits corners of Britain’s towns and cities.

It ended a two-year nightmare for Garrett, a 33-year-old US citizen who found fame in 2012 by scaling the Shard, when the tallest tower in Europe was under construction. He was photographed clinging to a crane 300 metres in the air.

Before he was arrested, Garrett had embarked on a four-year ethnographic study with more than 100 urban explorers, in which he participated in their regular trespasses. He joined the London Consolidation Crew, a group of part-time photographers interested in accessing off-limits architecture including the top of the Forth rail bridge in Scotland, abandoned mental hospitals and Joseph Bazalgette's Victorian sewer systems.

Bradley Garrett: 'I wasn’t in the dock for anything I did, but because I wrote about what I did.'

They went by pseudonyms such as Neb, Winch, Bacchus and Guts. Garrett chronicled the group's adventures including a drum and bass party in a disused bomb shelter beneath Clapham, accessing the Tyburn river under Buckingham Palace and rescuing a colleague trapped in a lift-shaft in a half-built City skyscraper.

Garrett was arrested in August 2012 by British transport police who boarded his incoming plane at Heathrow and seized his passport. While they held him in a London police station cell, officers took a battering ram to the door of his home in Clapham and confiscated his computer, phones, cameras and hard drive and PhD research notes, in a search for evidence of criminal damage.

"I wasn't in the dock for anything I did, but because I wrote about what I did," said the academic, who warned the prosecution could have "a chilling effect" on research. "Researchers will feel they can't put themselves in situations like this and, even worse, institutions could shut down research that takes people into areas that are legally sensitive. That will lead to the loss of a wealth of information about our society and especially groups that are marginalised – and that is dangerous."

Police who investigated the case said their investigation revealed that Garrett and another man, Christopher Reinstadtler, 32, who also pleaded guilty to criminal damage, had systematically broken into Transport for London property and accessed disused rail tunnels. "The railway, whether disused or in operation, is a dangerous place for those not meant to be there and access restrictions, which should not be taken lightly, are in place to protect members of the public from harm," a police spokesman said.

If tried and found guilty, Garrett could have faced jail, but on Wednesday following extensive pre-trial negotiations and the staying and dismissal of cases against seven other colleagues, he pleaded guilty to five counts of criminal damage to railway property. A judge gave him a three-year discharge and ordered him to pay £2,000 costs. The damage included removing a wing nut from a door and removing a board and replacing it again. Garrett described the conclusion as a "face-saving" exercise for both sides.

He remains concerned that the prosecution exposed his sources and he called for a debate about whether academic research material should enjoy similar legal protection to journalistic material, which can only be accessed if police obtain a court order.

"This case raises serious questions around academic freedom," said Danny Dorling, professor of geography at Oxford, who supported Garrett. "There is part of the state system that doesn't understand what academics do, just as there is part of the system that doesn't understand the value of a free press. We don't want to see people straitjacketed by fear of what might happen if their behaviour has been slightly transgressive."

The author Will Self, who has written a foreword to Subterranean London: Cracking the Capital, a book of photographs of the "place hacks" to be published this September, has applauded the explorers' "willingness to experience the city as it is, rather than being satisfied with the London that only comes with a price tag".

Leo Hollis, Garrett's editor, said the collapse of the prosecution was "a tremendous relief". "Academic adventurers have to find out what is going on and we see increasingly that our young academics are being criminalised for testing the boundaries and that is incredibly dangerous," he said. "It is a way of stifling free speech and free thought."

Bunker busters

The Clapham North shelter was a site of serial illicit trespass. In March 2011, the crew threw a party there. We hooked up Neb's sound system, played "bunker frisbee" and danced to drum and bass under disco lights that Popov had dragged down the 30m staircase.

But for a long time, the Clapham Common bunker remained uncracked. One sunny day, I found to my surprise and delight the door to the airshaft swinging open. I called up the usual suspects and they arrived an hour later with ropes, harnesses, torches and too much adrenaline.

As Dan, Patch and I slipped into the broken door, Guts closed it behind us. Dan rigged the ropes on to some rusty sixty60-year-old piping and dropped thirty30 metres into the darkness, I followed trembling with nervous anticipation.

It seemed we had free access to an entire bunker full of potentially sensitive documents, though in the end we all joked about how unexciting most of it actually was. Just weeks after Julian Assange's WikiLeaks fiasco, when he appeared in a London courtoom for disclosing government secrets, we had gained entry to a secure file-storage area and had unrestrained access to all the documents it contained.

An edited extract from Explore Everything by Bradley Garrett