Energy giant Shell won a court order on Wednesday to prevent environmental activists from boarding installations in the North Sea oil fields off Scotland.

The Court of Session in Edinburgh imposed an injunction against environmental group Greenpeace after its activists spent the night on Shell’s Brent Alpha and Bravo platforms in October.

They were protesting against the oil major’s decision to leave parts of the platforms in the sea when they are decommissioned.

The Brent Field is located midway between the Shetland Islands, off northwest Scotland, and the coast of Norway.

“Shell sought this court order only to prevent protesters breaching the statutory 500-metre (1,640-feet) safety zones around platforms in the Brent field, putting themselves and Shell staff at risk,” said a Shell spokesman.

“We wholeheartedly support the right to protest peacefully and safely.”

Greenpeace called the ruling a “setback”.

“We strongly believe in the right to protest and will keep defending it,” said Meike Rijksen, campaigner for Greenpeace Netherlands.

“Shell can try to shut us up but we will only get louder.”