The Natural Resources Defense Council is expected on Wednesday to announce a lawsuit against the two major railroads that operate in Los Angeles, alleging they produce harmful amounts of diesel pollution.

The environmental group this summer sent letters warning Union Pacific Railroad and Burlington Northern Santa Fe Railway Co. that a federal suit would be filed if the companies didn’t cut pollution at rail yards across California.

“There’s been no response from either railroad,” said David Pettit, a senior attorney at NRDC’s Los Angeles office.

The lawsuit, which will be detailed at a Long Beach press conference, alleges that diesel pollution from the rail yards, including ones in Carson, Commerce and downtown Los Angeles, is harmful to nearby residents’ health. The suit seeks to prove the harm and force the railroads to clean up the yards.

Lena Kent, a spokeswoman for Burlington Northern, based Fort Worth, Texas, said the company complies with federal air quality regulations and has an agreement with the California Air Resources Board to further cut diesel emissions.

“These voluntary efforts have improved rail’s environmental advantages over the highway by using the cleanest fleet of locomotives in the nation,” she said. “The decision by NRDC and its allies to file suit is misdirected and represents another attempt to attack the region’s goods movement industry.”

Union Pacific, based in Omaha, Neb., issued a similar statement: “Union Pacific is regulated at the state and federal levels and continues to remain in compliance with those regulations,” said spokesman Aaron Hunt.

Both railroads have pending expansion plans in Southern California. Burlington Northern wants to build a new rail yard in Wilmington and Union Pacific want to expand an existing yard in Carson.

Pettit said the NRDC and local environmental groups want the railroads to first clean up the existing yards before expanding or building more.