BP will pay Texas $50 million after the sides reached an unprecedented settlement over air pollution violations at the beleaguered oil giant's Gulf Coast refinery, the site of a massive explosion in 2005 that killed 15 people.

The settlement announced Thursday coincides with BP PLC's attempts to restore its reputation and resolve lawsuits over the April 2010 rig explosion that killed 11 people and caused the largest offshore oil spill in U.S. history. It may also help BP find a buyer for the Texas City refinery since it will settle pollution liabilities with the state.

The agreement covers 72 emissions violations since the explosion. But some environmentalists note the decades-old refinery consistently has problems complying with basic environmental regulations, and any buyer would have to contend with the lingering problems of old, outdated equipment.

Still, BP Products North America and Texas both welcomed the agreement, with Attorney General Greg Abbott saying the dollar amount is a record-setter for the state's clean air act.

"There are rules that must be followed, and if you violate those rules there will be consequences," Abbott said. "They exposed Houstonians ... to poor air quality and now they're paying the price for it."

BP said in a statement it views the settlement as a continuation of its attempts to improve operations at the Texas City refinery.

"BP has maintained a steady focus on improving safety and compliance at Texas City, and this agreement is an important milestone in the progress of operations at the facility," the company said.

The company has not yet indicated whether it has a buyer, but some speculate settling old grievances makes such sales easier. In August 2010, BP reached a $50.6 million settlement with the U.S. Occupational Safety and Health Administration for failing to correct safety violations after the 2005 explosion. At the time, OSHA indicated it was also trying to force the company to pay an additional $30 million in fines.

The settlement with Texas also resolves violations from a high-profile 41-day benzene release in April 2010 that prompted a class-action suit by Texas City residents and an investigation by the U.S. Environmental Protection Agency.

This agreement does not resolve lawsuits or investigations by other agencies, or any future problems at the refinery.

And that, says Matthew Tejada, executive director of the Houston Air Alliance, is key.

BP's refinery in Texas City has always had problems complying with regulations, and there is no indication from the agreement that any settlement dollars will go toward environmental protection or monitoring in the community. At the moment, he said, there are only a few monitors for cancer-causing benzene. Only people who subscribe to email blasts from the Texas Commission on Environmental Quality would know when there is a danger, and if the wind is blowing in the right direction, the toxins will fly right past the monitors, he said.

"This money should be used to put in place some environmental protections and monitoring in Texas City," Tejada said, noting that the technology to properly monitor and inform the community exists, and the $50 million would more than cover the cost of purchase and installation.

Tejada said it took Texas too long _ more than six years _ to resolve the violations, which he called an "indictment of the entire environmental enforcement system in the state.

"The state of Texas wasn't the one that suffered from all this pollution. It was the people of Texas City," he said.

__

Associated Press writer Juan A. Lozano contributed to this report.

__

Follow Ramit Plushnick-Masti on Twitter at https://twitter.com/RamitMastiAP