General Motors is being sued for allegedly rigging diesel engine versions of its Silverado and Sierra HD vehicles to pass emissions tests.

The suit, which was filed Thursday and seeks class-action status, alleged GM placed emissions test defeat devices in 705,000 Sierra HD and Silverado models of heavy-duty trucks with Duramax diesel engines. The trucks emit two to five times the legal limit of dangerous NOx pollutants in real-world driving, the suit said.

It also alleged German auto parts maker Bosch was "an active and knowing participant in the scheme," by supplying electronic diesel controls that allowed GM to implement defeat devices.

A GM spokesman told CNBC that the "claims are baseless and we will vigorously defend ourselves. The Duramax diesel complies with all U.S. EPA CARB emissions standards."

A Bosch representative told CNBC the company "takes the allegations of manipulation of diesel software very seriously. Bosch is cooperating with the continuing investigations in various jurisdictions, and is defending its interests in the litigation."

Shares of GM fell as much as 2.7 percent on the news. The stock later recovered some of its losses, but still ended the day 1.8 percent lower.

The specific trucks named in the suit are the model year 2011-2016 GM Sierra 2500 HD and

3500 HD trucks, and GM Silverado 2500 HD and 3500 HD trucks.

"To appeal to environmentally conscious consumers, GM markets its Silverado and Sierra Duramax vehicles as having low emissions, high fuel economy, and powerful torque and towing capacity. GM charges a premium of approximately $5,000 for diesel-equipped vehicles over

comparable gas vehicles," the suit said.

"GM's representations are deceptive and false, and GM sold these vehicles while omitting information that would be material to a reasonable consumer that GM has programmed its Silverado and Sierra Duramax vehicles to significantly reduce the effectiveness of the NOx reduction systems during real-world driving conditions," it said.

Several automakers have been accused of cheating on diesel emissions tests since a scandal involving Volkswagen emerged in 2015. Bosch electronic diesel control devices were at the center of that lawsuit as well.

RBC Capital analyst Joseph Spak estimated in a note sent Thursday that the diesel versions of the GM pickup trucks in question represent about 12 to 12.5 percent of all the company's full-size pickups.

The 190-page complaint references VW more than 80 times, and says the GM models may have caused more environmental harm than those of the German automaker's vehicles, according to Bloomberg, which first reported the claims.