Authorities in western Germany have warned some 10,000 residents not to drink the tap water after a hole was found in a fence around a water tank that also supplies a nearby military base, in the second such incident this week.

Local authorities in the town of Mechernich said the cut fence was discovered Thursday afternoon and that tests were currently being carried out to determine if the water had been contaminated.

Germany -- a key ally of Kyiv -- has been on high alert for sabotage and attacks on military facilities in the country in the wake of Moscow's 2022 invasion of Ukraine.

"Due to unauthorised access" to Mechernich's drinking water system, "there may have been a health-endangering contamination of the drinking water," said a statement on the town's website late Thursday.

Residents of Mechernich and surrounding towns, some 10,000 people overall, were told to avoid using the water for drinking, showering, cooking or washing clothes.

Mechernich's water system site also supplies a nearby Bundeswehr military base, and the hole in the fence was spotted after patrols were increased this week following a suspected act of sabotage at a base near Cologne airport, local official Thomas Hambach told German media.

The Cologne-Wahn base was temporarily sealed off Wednesday after a hole was discovered in a fence near drinking water storage facilities.

Tests later showed "unusual values" in the water, the military said.

The defence ministry said authorities were investigating a possible act of sabotage.

Around the same time, NATO announced there had been an attempted trespassing incident late Tuesday at its base in the western German town of Geilenkirchen, which houses AWACS reconnaissance aircraft.

No link was established with the Cologne incident, and NATO said there were no concerns about the water supply at Geilenkirchen.

Defence Minister Boris Pistorius on Wednesday said the security scares "show we must remain vigilant".

In April, investigators arrested two German-Russian men on suspicion of spying for Russia and planning attacks in Germany -- including on US army facilities -- to undermine military support for Ukraine.