Naked Rambler Stephen Gough has spent more than six years in Scottish prisons for refusing to put his clothes on. The authorities have made it clear they do not want him there but the rambler is sticking to his principles. The result is possibly the UK's oddest legal stand-off.

The Naked Rambler has been released from prison in Edinburgh after serving his latest sentence for public nudity.

Stephen Gough has 18 convictions and has been in prison almost without a break since May 2006.

His previous spells of freedom have often been as little as a few seconds, with arrest following his refusal to wear clothes on departure from prison.

The offences of which he has been convicted are breach of the peace and contempt of court, refusing to wear clothes in front of the sheriff.

He has twice walked naked from Land's End to John O'Groats - in 2003-04 and 2005-06 - typically wearing only boots, socks, a rucksack and perhaps hat.

The point Gough is trying to make has become an expensive one for the rest of us John Scott, Human rights lawyer

In England, Gough had run-ins with the police, but the attitude in Scotland has consistently been tougher with police and courts mostly agreeing that being naked in public is fundamentally a breach of the peace.

Gough's attitude has also hardened, with the rambler refusing to wear clothes in court or after being arrested, leading to contempt of court convictions.

The authorities in Scotland are growing rather weary.

After his last conviction, the prosecution service issued a statement, the tone of which could be said to be exasperated.

The Crown Office, responsible for prosecutions in Scotland, pointed out that it and the police had done all they could to "prevent" Gough from offending. In order to break the "vicious circle" which sees Gough thrown back in prison as soon as he is released, police chiefs decided earlier this year on a different approach.

In July, Gough, a 53-year-old former marine from Eastleigh, Hampshire, was allowed to walk away from Perth prison without wearing clothes.

Ch Insp Andy McCann, of Tayside Police, says a decision was taken to allow Gough to go on his way and only arrest him if his behaviour was gratuitous. "We asked him to show a bit of consideration," McCann says.

But within three days, Gough was back in court after he walked naked past a children's playground in Fife.

Image caption Stephen Gough refuses to wear clothes in prison or in court

Adrian Cottam, procurator fiscal summary for the east of Scotland, says that despite repeated police requests, Gough has "intentionally caused shock and alarm to children and their parents".

At Kirkcaldy Sheriff Court, Sheriff James Williamson says Gough's "disregard for other members of the public, in particular children" shows "arrogance" and "self-indulgence". He also lost patience with Gough for his refusal to allow social workers to assess his mental health.

"When he did walk the length of the country he was variously ignored, celebrated and arrested," Ch Insp McCann says.

Police have a certain amount of discretion over whether to arrest a person for being naked in public, he adds, and if people just see Gough as an "oddity" it would be fine to allow him to carry on.

"It is about context and the alarm he is causing and his intention to cause alarm and whether his offences are flagrant and persistent."

Gough's second walk to John O'Groats ended in February 2006.

It took eight months because his trek was broken by spells in prison - but not even snow in the far north of Scotland could deter him from rambling naked.

He is perceived to have been confrontational, intolerant and inconsiderate British Naturism on Gough's behaviour

In May of that year, on a flight from Southampton to Edinburgh to attend an Appeal Court hearing, Gough stripped off in the toilet and was arrested when the plane landed. He has been in prison pretty much since then, and has spent six years in segregation.

"He's had to be managed separately from other prisoners because he refuses to wear clothes," says Tom Fox, of the Scottish Prisons Service. "He is asked every day if he will put on clothes and he refuses."

Fox says it is a self-imposed segregation that causes difficulties for prison management, but prison rules say that clothes must be worn.

John Scott QC, chair of the Howard League for Penal Reform in Scotland, says the bill to keep Gough in prison for so long must have reached hundreds of thousands of pounds. It costs about £40,000 a prisoner a year, rising when an inmate is separated from others, and when he is repeatedly discharged and readmitted.

Other naked protests In 1969, in Denmark, 300 individuals took part in a naked "wade-in" on a beach. As as result it is now permissible to be naked on all but two Danish beaches

The Freedom to be Yourself campaign, founded in 1999 by Vincent Bethell, have staged a series of nude demonstrations in the US and the UK

campaign, founded in 1999 by Vincent Bethell, have staged a series of nude demonstrations in the US and the UK Peter Niehenke, founder of the German pro-naturist group Wald-FKK, has been fined several times for jogging naked

has been fined several times for jogging naked The German campaign Nacktwandern wants the right to go hiking in the nude

wants the right to go hiking in the nude In Ukraine, the group Femen regularly holds naked demonstrations against sexism and sex tourism

"The point Gough is trying to make has become an expensive one for the rest of us," Scott says. "He has accrued the kind of prison sentence which people usually get for doing real harm and crimes of violence."

It is Gough's contention that to be naked in public is a fundamental freedom and that nakedness is an aspect of his personal autonomy.

"The human body isn't offensive," he told the Guardian in March 2012. "If that's what we're saying, as human beings, then it's not rational."

Gough says he is determined to make his way the length of the UK "without compromises". He took this view all the way to the Scottish appeal court, where it was rejected.

Scott, who is also a human rights lawyer, says being naked is "not generally accepted to be a human right".

"You can develop your own thinking on what a human right is but if that clashes with the rights of other people not to be upset or alarmed then you have a problem."

Andrew Welch, commercial manager of British Naturism, says Gough's behaviour has been "perceived to be confrontational, intolerant and inconsiderate".

But Welch agrees with the principle that it is not an offence to choose not to wear clothes. There is no evidence that nudity causes harm to anyone of any age, he says, and "body shame" results in widespread and often serious negative effects, mainly to children and young people.

"Nakedness is not illegal. A lot of this is about the application of the law," Welch says.

"Naturist people are law abiding but we would like to know what the law is. People in authority seem to let personal opinion overcome what the law says."

A number of Gough's convictions have been for contempt of court as he refuses to wear clothes in front of the sheriff. But the charge which gets him in front of the sheriff in the first place is breach of the peace.

Notable dates Jan 2003: arrested in home town of Eastleigh, Hants

June: began Land's End to John O'Groats trek

Detained 13 times from June to August

In England, often quietly let out or released in another jurisdiction

Numerous arrests in Scotland in Duns, Selkirk and Inverness

28 Nov: three-month sentence , but released from Inverness Prison due to time served and rearrested next day

, but released from Inverness Prison due to time served and rearrested next day 2005: two weeks in Edinburgh Prison and five months in Inverness Prison

in Edinburgh Prison and in Inverness Prison May 2006: arrested on Southampton-Edinburgh flight, given three-month sentence

25 Aug: seven-month sentence

30 Nov 2007: three-month sentence for contempt of court (dating from Dec 2005)

for contempt of court (dating from Dec 2005) 2008 - more arrests

16 July 2009: 12-month sentence in Perth Prison

in Perth Prison Feb 2010: 21-month sentence in Perth

sentence in Perth Nov:sentenced to 15 months and 26 days

25 Aug 2011: sentenced to 657 days

13 Sept 2012: five-month sentence in Fife Prison, his 18th conviction

Criminal solicitor Grazia Robertson notes the flexibility of the offence. "You do not have to pass a new statute every time someone coughs in the wrong place," she says.

But just because "one little old lady is shocked" it is not enough to prove there has been a breach, she says.

On two occasions during his long history with the Scottish courts, Gough has been cleared by sheriffs.

In 2007, Sheriff Isobel Poole ruled there was insufficient evidence to show that his state of undress had caused alarm to members of the public. Gough had been arrested in the car park after being released from Saughton Prison in Edinburgh.

The sheriff decided there was no evidence of "actual alarm or disturbance", although she understood how such conduct could be considered unpleasant to passers-by.

If Gough maintains his insistence on public nudity, what can the Scottish legal system do?

One option - which the Crown Office says it has tried - is shipping him back to England.

On his release from Edinburgh prison in 2007, police officers offered to take Gough to an address of his choosing in Yorkshire. Although he originally agreed to go with them, he changed his mind and attempted to walk from the prison along the A71 and was arrested again.

Scott says the sooner a way is found to get Gough out of Scotland the better.

"It is a situation calling for a degree of compromise from the authorities but they can't be seen to be saying he can do whatever he wants. If it was decided to let him on his way naked, they would not be saying he has won. People are not going to copy him.

"The state needs to keep a sense of proportion because the harm he is causing is more offence and annoyance than damage to people and society. This could carry on until he is too ill to put on clothes. And that does not strike me as a sensible approach on behalf of the state."