Caroline Lucas, the Green party MP, has been found not guilty of obstructing a public highway and a public order offence during high-profile anti-fracking protests.

As she and four co-defendants walked free from court, she said: "The action we took was for all of our futures" as she pledged to continue to fight against fracking.

Lucas, 53, the MP for Brighton Pavilion, was among a group of protesters who had linked arms outside energy company Cuadrilla's exploratory oil drilling site in Balcombe, West Sussex, in August.

During the trial at Brighton magistrates court alongside four co-defendants, she said she "wanted to express solidarity" by protesting peacefully.

She was found not guilty of the two charges she faced – wilful obstruction of a public highway and breaching an order under section 14 of the Public Order Act.

In a statement read from the court steps, Lucas said: "We are very pleased that the court upheld our right to peacefully protest against fracking. Protest is the lifeblood of democracy.

We are deeply concerned that the right to protest is being eroded and undermined, with legitimate protest criminalised by oppressive policing in an attempt to silence dissent.

"This judgment is right but is not a cause for celebration. We will continue to campaign to end fracking and only celebrate when our world is on the path of a clean energy future."

Lucas said that the UN's latest comprehensive report on climate change "make it clearer than ever that exploiting new sources of fossil fuel such as shale gas will fatally undermine the government's stated ambition to protect Britain from the worst impacts of the climate crisis to meet our international obligations to reduce emissions".

"The only safe and responsible thing to do with shale gas is to leave it in the ground," she added, to cheers from supporters outside the court building.

"Fracking will not lower our fuel bills. It will not give us energy security and it will not create significant numbers of jobs."

She added: "Fracking will accelerate climate change and pollute our environment." It would lead to "yet more dependence on fossil fuel precisely when the overwhelming scientific and political consensus confirms that we need to move urgently in the opposite direction.

"Now more than ever David Cameron must listen to the climate scientists rather than letting oil and gas industry lobbyists dictate UK energy policy. He needs to show real leadership by calling for an immediate end to fracking."

Though Cuadrilla did not frack at the Balcombe site, protesters fearing they might do so in future formed a large camp near the site entrance and extra officers were drafted in, the trial heard.

A notice under Section 14 of the Public Order Act was imposed, requiring demonstrators to use a designated protest area away from Cuadrilla's entrance

Lucas told the trial it felt important and symbolic to be based outside the main gate during the protest, which lasted about five hours

Giving evidence, she denied being told of a designated protest area by police, adding: "I couldn't see any reason why we couldn't continue our peaceful protest."

PC Robert Staplehurst, of Sussex police, told the court he approached Lucas, said there was a Section 14 notice and asked whether there was anything he could say to move her.

Lucas - who was elected as the Green party's first MP in the 2010 general election - replied no and was arrested.

She told the court: "If we had another 10 to 15 minutes we could have come to an agreement to end it and dispersed. We weren't doing anything different than we were in the previous five hours."

District judge Tim Pattinson said the prosecution had failed to satisfy him that Lucas had "the requisite knowledge" about the Section 14 order being in place.

She knew of the notice, had briefly scanned it, was intending to consider it carefully later but it was then lost when a banner was unfurled, he said.

"She was distracted by the arrest of her son and the obvious pain being caused to him during his arrest. She had no idea where the designated area was."

On the obstruction charge, he said he did not hear any evidence that any actual obstruction of a vehicle or person was caused by the protest.

Co-defendants - Josef Dobraszczyk, 22, from Bristol; Ruth Jarman, 50, from Hook, Hampshire; Sheila Menon, 42, from north east London; and Ruth Potts, 39, from Totnes, Devon - were also cleared of both charges.