A protester accused of breaching a High Court injunction banning people from taking action against tree felling in Sheffield has had his case dismissed.
Paul Brooke was accused of violating the order by entering the area around a tree due to be cut down.
He said he had only done so to protect a woman he thought was being assaulted.
While Mr Brooke was "mistaken" about the assault, Mr Justice Males ruled, his actions were "necessary in the light of the belief he held".
Mr Brooke was one of four people taken to court for allegedly breaching an injunction obtained by Sheffield City Council in 2017 to stop people from preventing tree felling.
At a hearing earlier this month, the city's crown court heard Mr Brooke had entered a safety zone erected in Meersbrook Park Road on 22 January.
He admitted entering the area but said he had done so "to go to the defence of a female protester who was being forcibly removed by security staff".
In his written ruling, Mr Justice Males said the "defence of another may provide a justification for entering a safety zone" in principle but "this decision is not a licence for future breaches".
Thousands of trees have been felled in Sheffield as part of the council's 25-year £2bn Streets Ahead project.
However, campaigners claim some of the trees cut down or earmarked for felling are healthy.
Tree felling work in the city has been on hold since January.
Mr Brooke said the court case had been "hugely stressful" but he would continue to protest against the felling of healthy trees.
However, he added: "I certainly won't be breaching the injunction [in future]. It was never my intention to breach the injunction."
A spokesperson for Sheffield City Council said: "We believed the case was worth bringing to court but as with all cases - including the three where defendants were found to be guilty of breaching the injunction - we have always said the outcome is rightly a decision for Mr Justice Males, and not for the council."