The District’s attorney general filed suit Tuesday against Greyhound Lines, alleging the bus company illegally idles its buses for long periods at Union Station, contributing to air pollution.

Attorney General Karl A. Racine filed the suit in D.C. Superior Court after an investigation launched last year by his office and the District’s Department of Energy and Environment found 50 Greyhound buses idling at Union Station with engines ­running longer than the three-minute legal limit. Some buses idled longer than 30 minutes, the suit alleges.

The suit seeks $216,000 in penalties and to recoup investigation costs, as well as a court order to stop Greyhound buses from illegally idling. The alleged violations in 2018 and 2019 come after Greyhound broke the city’s anti-idling laws at least three other times in the prior three years, according to Racine’s office.

A spokeswoman for Texas-based Greyhound said the company couldn’t comment on pending litigation.

The complaint included Department of Energy and Environment enforcement notices that show Greyhound received repeated $4,000 fines within hours for buses idling longer than three minutes.

Vehicles from BoltBus, which is owned by Greyhound, also were cited, according to the court filing.

“In May and July of 2019, after already receiving notice of the prior violations, Greyhound buses violated the Idling Regulations yet again,” the complaint says. “The District brings this action to obtain all appropriate relief to remedy Greyhound’s continued disregard for District regulations and District air ­quality.”

Motor vehicle exhaust is “the largest source of air pollution in Washington,” the suit says.

In a phone interview Tuesday, Racine said the D.C. Council has provided resources, including attorneys and investigators, to help his office focus on environmental problems, which he said often disproportionately affect vulnerable communities.

“Rather than continue to issue violations without material changes, we decided to file suit,” he said.

Racine would not say whether other transportation companies will be investigated for idling at Union Station and elsewhere in the city, but he said his office will remain “active in the area.”