The 'Naked Rambler' Stephen Gough who has lost a High Court challenge against a conviction for violating public order when he walked through a town centre wearing only walking boots, socks and a hat Photograph: Andrew Milligan/PA

A man known as the "naked rambler" has lost a high court challenge against a conviction for violating public order when he walked through a town centre wearing only walking boots, socks and a hat.

Two judges in London rejected an appeal by former marine Stephen Gough, from Eastleigh, Hampshire, who says it is his human right to be naked in public.

Gough, 54, was convicted in March at Calderdale magistrates court in Halifax, West Yorkshire, of a breach of the Public Order Act relating to a 15-minute morning walk through the town with his genitalia "on plain view". As well as wearing his boots, socks and hat he was carrying a rucksack and had a compass on a lanyard around his neck.

Dismissing the appeal, Sir Brian Leveson, President of the Queen's bench division of the high court, and Mr Justice Openshaw, ruled that the district judge who dealt with the case at the magistrates court "was clearly entitled to conclude that, by walking through a town centre entirely naked, he was violating public order".

Sir Brian said: "For some 10 years Stephen Gough, the appellant, has walked naked through the highways and byways of the United Kingdom, from John o' Groats to Land's End.

"He has made it clear that arrests, prosecutions and convictions will not deter him from nude walking in the future."

Police in Halifax arrested Gough when he entered a convenience store on 25 October 2012.

Sir Brian said: "On interview, the appellant said that he did not think what he was doing was indecent and that the human body was not indecent; he did not know what the problem was."

At an appeal hearing earlier this month, the two judges heard submissions from a barrister on Gough's behalf that he posed no threat to the public, and was not abusive or insulting – he was doing no more than "walking in his natural state without interfering with others, not promoting what he does or challenging those who may disagree".

Counsel for the director of public prosecutions had argued that his conduct was plainly "disorderly behaviour" within the meaning of the Public Order Act.

Announcing the court's decision, Sir Brian said there was nothing passive about Gough's conduct that day in that he "knew full well" that many members of the public "would both be alarmed and distressed by the sight of his naked body whether or not others would take a more benign view and whatever the origins or psychological reasons for that alarm and distress".

He added: "Furthermore, he was being deliberately provocative in order to support his own stance. The existence of nudist colonies and naturist beaches are not to the point: they are in areas marked out, clearly identifiable and are thus avoidable.

"Neither does the unchallenged existence of naked cycle rides determine the matter: each case will be fact-sensitive and will fall for consideration on its own merits."

Sir Brian said the district judge concluded that being naked was a form of expression such that Article 10 of the European Convention on Human Rights – the right to freedom of expression – was engaged, "but that there was a pressing social need for the restriction of his right to be naked in the context of this case".

The district judge stated in relation to the appeal: "Mr Gough was not prevented from being naked in certain public contexts where nudity is expected or tolerated. However, those adults and children in Halifax town centre had no expectation of seeing Mr Gough naked and as such had no opportunity to avoid him until they had already seen him and decided to take avoiding action."

He said that as it was a summary-only offence with the maximum penalty being a fine of up to £1,000 the prosecution for the offence was a "proportionate response to the appellant's behaviour".

Sir Brian said the district judge's analysis of the evidence and the law "cannot properly be challenged", and having regard to the evidence "it is difficult to see how he could have decided otherwise".

He added: "Neither the facts that, on occasion, the police have helped the appellant, while naked, to leave urban areas (doubtless in order to avoid confrontation and potential disorder) and that they have on occasion declined to arrest or prosecute nor the reality that some people have not adversely reacted to his nudity or are not affected by it are not to the point.

"To say that the adverse reaction to the appellant's nudity is not his problem or the result of his behaviour (which is how the appellant articulated it) is to ignore reality."