Howard County has agreed to supply treated wastewater to cool a massive computer center being built at Fort Meade by the National Security Agency — a money-saving, environment-conserving deal that officials say could serve as a model for others.

The NSA is footing the cost of building a pump station, estimated at $40 million, and will pay the county up to $2 million a year for treated water that would otherwise be dumped into the Little Patuxent River. The station is to supply up to 5 million gallons of reclaimed wastewater per day when the NSA computer center opens in 2016.

"There are so many benefits to this project," said Howard County Executive Ken Ulman.

But NSA critics see an opportunity to disrupt the agency's controversial surveillance activities. A coalition of rights groups has targeted similar deals elsewhere — notably in Utah, where the NSA recently completed a $1.5 billion data center — lobbying state lawmakers to make it illegal for local governments to supply water, energy or other utilities to the agency.

"Maryland is one of the most crucial states in this national campaign," said Shahid Buttar, executive director of the Bill of Rights Defense Committee in Washington. "Because Congress has been so abysmally dysfunctional and inactive in the oversight arena for the last 10 years, the municipal checks and balances are really all that we the people have had an opportunity to exercise."

Buttar and other agency critics plan to study the Howard County-NSA deal. Ulman and NSA officials say they have heard no criticism of their agreement, which has been in the works for a couple of years but has received little publicity.

Since the NSA broke ground on its High Performance Computing Center-2 in May, revelations about the collection of telephone and Internet data have brought unprecedented scrutiny to the agency.

A federal judge ruled this month that the telephone program is "almost Orwellian" and probably unconstitutional. A second federal judge later ruled that it was legal and a valuable part of the nation's anti-terrorism efforts.

Separately, a presidential task force urged President Barack Obama to end the operation, to reform a secret surveillance court and to impose limits on the surveillance of close allies.

Ulman said neither the revelations by former contractor Edward Snowden nor the efforts of anti-surveillance activists has affected Howard County's work with NSA.

"This is a great democracy," he said. "People have the right to let their thoughts be heard, to protest. … But at the end of the day, we have major defense installations throughout this country that are woven into our economies, our communities, and they need the infrastructure to perform their mission. The discussions around what the mission should be, that's an appropriate venue for our national leaders."

Fort Meade, though based in Anne Arundel County, is the largest employer of Howard County residents.

The new computing center will assist in "front-line defense against immediate threats" in cyberspace, Gen. Keith B. Alexander, the NSA director, said at the groundbreaking in May.

Officials said it will help analysts identify and combat cyber attacks —incursions into U.S. computer networks aimed at stealing identities, intellectual property or state secrets.

The 600,000 square-foot center is what NSA calls a "darkened site" — a facility that is operated remotely through software, with a minimal staff of engineers and maintenance workers to fix hardware, plumbing, electrical and other problems that might arise.

Workers at the pump station site on Route 198 were subjected to background checks and made to sign nondisclosure forms before they were allowed to participate in the project.

Stephen C. Gerwin, chief of Howard County's utilities bureau, called it "a peculiar project."

"I went on the base," he said. "You watch a film and you sign a document that says if you say anything, you go to jail for a million years. They're real tight about their security, as they should be."

Harvey Davis, director of installation and logistics at the NSA, said the arrangement is "dramatically beneficial for the taxpayers and also really good for the ecosystem."

NSA could have drawn tap water or dug wells to cool its computers, but Davis said those options were far more expensive and would have added stress to a local aquifer already burdened by rapid development in the area.