Environmental protesters have been barred from land where they say HS2 is carrying out works putting almost a quarter of London’s drinking water at risk, following a high court ruling on Thursday.

The transport secretary, Chris Grayling, and HS2 Ltd were granted an extension to an existing injunction to prevent environmental activists from trespassing on the controversial HS2 site, a nature reserve in Colne Valley in Hillingdon, west London, which is an area of ancient woodland.

There have been many protests on the site, with demonstrators saying they are trying to save up to 100 acres of ancient woodland and 2,400 species of flora and fauna. HS2 says it is creating an ecology habitat (pdf) on the site to compensate for any destruction caused by the construction of the high-speed rail link.

The decision by David Holland QC, sitting as a deputy high court judge, extends the geographical area of the injunction to a field where the aquifer supplying 22% of London’s water is located.

Protesters argued in court that any acts of trespass were carried out because of concerns that the HS2 works pile-driving through contaminated land into the aquifer would contaminate part of the capital’s water supply.

Holland acknowledged the sincerity of the protesters’ motivations but said that as HS2 had possession of the land, the law was on their side to prevent trespass. He did, however, reject HS2’s application to keep the injunction in place until 2024, granting it instead until 1 June 2020.

In the course of the hearing it emerged that a map of the whole area of land owned by HS2 had been mistakenly cited as the area covered by the injunction. In fact, the injuncted area does not cover all the land owned by HS2 around the site. Breaching a high court injunction is contempt of court and attracts much more serious penalties than the offence of trespass.

In a statement to the Guardian, an HS2 spokesman said: “It was explained in the court proceedings that the map in question shows the land in the possession of HS2 at that time. The map has been incorrectly labelled as ‘Close up map of injunction order Harvil Road’ in the Crown Prosecution Service document describing the incident on 11 December 2018 [an alleged incident of trespass in breach of the injunction]. It should be labelled ‘Close up map of HS2 land possession’. HS2 will inform the CPS that their document should be updated and the plan relabelled.”

Sarah Green, a member of the Green party who was one of the protesters named in the injunction application by HS2, said: “I’m very disturbed about the potential for HS2’s work to destroy the whole valley including the aquifer beneath it. They have accused me of breaking the injunction on land that isn’t injuncted. This could pollute the water supply for 3.2 million people.”

Holland said to Green: “I’m concerned that your obvious energies are directed in the wrong direction. If you genuinely think there’s a real risk, you have mentioned criminal offences. If there is something in this you need to take it to someone, but not me.”

Following the hearing, Green said: “I’m very disappointed that the area of land covered by the injunction has been extended. There is a real risk to the aquifer supplying 22% of London’s water and that matter has been put before the high court.”

A spokesman for the Environment Agency said: “The Harvil Road construction compound in Hillingdon is subject to monitoring and has shown no contamination. The Environment Agency continues to work with and advise HS2 Ltd in relation to any potential environmental risks associated with the proposed construction of the HS2 project.”

An HS2 spokesperson said: “As work progresses on the new railway, safety and security around all our live construction sites is paramount. HS2 has applied for an extension to the injunction at Harvil Road to keep people safe around our sites in the area, and to help us avoid delays and additional costs to the UK taxpayer. HS2 aims to be one of the most environmentally responsible infrastructure projects ever delivered in the UK .”