CUPERTINO — The Lehigh Hanson cement plant, a longtime producer of Silicon Valley building materials but also a significant polluter, will pay $7.5 million as part of an agreement with the U.S. Environmental Protection Agency to settle charges it dumped millions of gallons of toxic wastewater into a nearby creek.

Under the settlement, scheduled to be announced at a news conference Wednesday, the facility, owned by Hanson Permanente Cement and operated by Lehigh Southwest Cement, will be required to spend $5 million to install an advanced wastewater treatment plant. The company also will pay $2.55 million in civil penalties to the government.

From 2009 to 2014, the quarry in the Cupertino hills discharged wastewater containing levels of selenium — a naturally occurring element that is toxic to fish, birds and other wildlife — in excess of its permits into Permanente Creek, which flows into San Francisco Bay.

Although the discharges did not harm human health, they did harm a variety of wildlife species, including several species of fish and California red-legged frogs, said Jared Blumenfeld, EPA’s regional administrator in San Francisco.

“This was pretty serious,” Blumenfeld said. “Ultimately, the reason that this and other pollution sources to the bay are important is that the bay is still in peril. The pollution that we think is largely abated because of the Clean Water Act still continues, and this is a pretty major pollution source into San Francisco Bay.”

Blumenfeld said his agency also is closely monitoring the plant’s air emissions.

The company, which has a regional headquarters in San Ramon and a national headquarters in Dallas, said work is already underway to reduce water pollution.

“We are pleased to resolve these issues with an agreement that is aligned with our company’s commitment to operating in a safe and environmentally responsible manner,” said Kari Saragusa, president of Lehigh Hanson’s west region. “We are very proud of the innovative and ground-breaking technology we helped develop and implement to reduce waterborne selenium and other constituents. The new water treatment system at the Permanente facility is a clear example of our focus on continuous improvement in all aspects of our operations.”

The plant, which opened in 1939, produces more than half the cement used in the Bay Area and 70 percent of the cement used in Santa Clara County.

Established by industrialist Henry J. Kaiser, its cement built Shasta Dam, Highway 101, Highway 85 and other major Northern California landmarks.

It is also one of the region’s major polluters, ranking at or near the top of Bay Area industrial sites in recent years for emissions of greenhouse gases and airborne mercury.

The 3,500-acre facility, which is visible to motorists on Interstate 280 and Highway 85 as a large scar in the otherwise wooded hillsides, is home to a huge open-pit limestone quarry and a giant industrial kiln that heats the rock to 2,400 degrees. It has faced stricter oversight as environmental laws have tightened. The plant installed new equipment to reduce mercury emissions by 90 percent, for example, to meet tough new mercury standards imposed by the Obama administration.

In 2012, the EPA decided not to include the quarry on the federal Superfund list, saying that its pollution issues do not pose a human health risk.

But it has faced lawsuits and strict opposition from some neighbors, who have argued it should be shut down. In 2011, the Sierra Club sued the company over the selenium discharges into the creek and won a settlement in 2013 that required an interim wastewater treatment system.

“We don’t believe they need to be shut down. We believe they should comply with existing environmental regulations,” John Cordes, director of the Loma Prieta chapter of the Sierra Club, said on Tuesday.

“This settlement is a good thing. But we continue to work with them on air pollution issues. The quarry is still a major polluter in Santa Clara County.”

In addition to concentrated selenium, the cement plant also regularly discharged water with high levels of nickel, mercury, thallium, hexavalent chromium and other pollutants into the creek, which is listed as “impaired” under the Clean Water Act, the EPA said.

Joining the EPA in the settlement was the state Department of Justice and the San Francisco Bay Regional Water Quality Control Board.

“Lehigh Cement discharged millions of gallons of industrial wastewater that flowed into the San Francisco Bay,” Attorney General Kamala Harris said. “This settlement holds Lehigh Cement accountable for its actions and will prevent future toxic discharges.”

Paul Rogers covers resources and environmental issues. Contact him at 408-920-5045. Follow him at Twitter.com/PaulRogersSJMN.