* Texas AG says BP put profits ahead of environment

* Monday lawsuit second against energy giant

* Federal class action suit draws 12,000 plaintiffs

(Adds details, background, info about class-action suit)

By Erwin Seba

HOUSTON, Aug 9 (Reuters) - Texas Attorney General Greg Abbott is suing BP Plc BP.LBP.N for excess pollution in April and May from the energy giant's massive Texas City, Texas, refinery, his office said on Monday.

Abbott said in a statement the lawsuit could cost BP millions of dollars in fines for pollution released during the 40-day malfunction of a refinery unit.

A BP spokesman had no immediate comment about Monday’s lawsuit.

The Texas lawsuit contends BP was motivated by profits when it allowed over 500,000 pounds of pollutants to be released into the air, including 17,000 pounds of benzene, a known carcinogen, between April 6 and May 16.

“BP made very little attempt to minimize the emission of air contaminants caused by its actions, once again prioritizing profits over environmental compliance,” according to the lawsuit.

Previously, BP has said air monitors around the refineryfound no increase in pollution while a malfunctioning hydrocracking unit at the 465,000 barrel per day (bpd) refinery was operating at 55 percent capacity due to a compressor breakdown.

This is the second lawsuit Abbott is pursuing against BP for pollution at the Texas City refinery. That lawsuit includes a deadly 2005 explosion at the Texas City refinery that killed 15 workers and injured 180 other people.

A $10-billion federal class action lawsuit over the April-May pollution by workers at the refinery and residents of Texas City , located 50 miles south of Houston, has drawn 12,000 plaintiffs in the week after it was filed in federal court in Houston, a Houston attorney said on Monday.

“Now that BP disclosed the release, (the plaintiffs) are mad that they weren’t told they were being gassed and are seeking a court remedy,” said Houston attorney Tony Buzbee, who brought the federal suit. “This is a punitive damages case if there ever was one.”

BP already faces federal criminal and Congressional investigations into the Deepwater Horizon drilling rig explosion, which caused a three-month oil spill that released an estimated 4.9 million barrels of crude oil into the Gulf of Mexico.