The US army has admitted to blocking access to parts of the Guardian website for thousands of defence personnel across the country.

A spokesman said the military was filtering out reports and content relating to government surveillance programs to preserve "network hygiene" and prevent any classified material appearing on unclassified parts of its computer systems.

The confirmation follows reports in the Monterey Herald that staff at the Presidio military base south of San Francisco had complained of not being able to access the Guardian's UK site at all, and had only partial access to the US site, following publication of leaks from whistleblower Edward Snowden.

The Pentagon insisted the Department of Defense was not seeking to block the whole website, merely taking steps to restrict access to certain content.

But a spokesman for the Army's Network Enterprise Technology Command (Netcom) in Arizona confirmed that this was a widespread policy, likely to be affecting hundreds of defence facilities.

"In response to your question about access to the theguardian.com website, the army is filtering some access to press coverage and online content about the NSA leaks," said Gordon Van Vleet, a Netcom public affairs officer.

"The Department of Defense routinely takes preventative 'network hygiene' measures to mitigate unauthorized disclosures of classified information onto DoD unclassified networks."

The army stressed its actions were automatic and would not affect computers outside military facilities.

"The department does not determine what sites its personnel can choose to visit while on a DoD system, but instead relies on automated filters that restrict access based on content concerns or malware threats," said Van Vleet. "The DoD is also not going to block websites from the American public in general, and to do so would violate our highest-held principle of upholding and defending the constitution and respecting civil liberties and privacy."

Similar measures were taken by the army after the Guardian and other newspapers published leaked State Department cables obtained via WikiLeaks.

"We make every effort to balance the need to preserve information access with operational security, however there are strict policies and directives in place regarding protecting and handling classified information," added the Netcom spokesman.

"Until declassified by appropriate officials, classified information – including material released through an unauthorized disclosure – must be treated accordingly by DoD personnel. If a public website displays classified information, then filtering may be used to preserve 'network hygiene' for DoD unclassified networks."

A Defense Department spokesman at the Pentagon added: "The Guardian website is NOT being blocked by DoD. The Department of Defense routinely takes preventative measures to mitigate unauthorized disclosures of classified information onto DoD unclassified networks."