WASHINGTON (AP) -- Beleaguered oil giant BP has agreed to pay a record $50 million fine for failing to correct safety hazards at its Texas City oil refinery after a 2005 explosion killed 15 workers.

The Occupational Safety and Health Administration said Thursday it is still working to collect another $30 million for other penalties that the company is contesting.

While the fines pale compared to the billions BP is committed to paying out for damages caused by the massive oil spill at its well in the Gulf of Mexico, it stands as the largest penalty issued in OSHA's history.

OSHA initially had proposed $87 million in penalties last October, but later reduced it to $80 million.

BP had contested the entire amount before agreeing to pay $50 million for hundreds of violations that it was supposed to fix under a 2005 agreement with the agency. OSHA said that BP had failed to make the improvements quickly enough, while BP had sought additional time to complete the repairs.

The agency also claims BP committed hundreds of new violations at the plant since the blast occurred. OSHA wants BP to pay another $30 million in penalties for allegedly failing to repair safety valves that protect equipment and pipes from becoming overpressurized.

OSHA officials have blamed the Texas City explosion on a piece of equipment that overfilled with highly flammable liquid hydrocarbons. Alarms and gauges that were supposed to warn of the overfill did not work properly.

The deadly explosion at the refinery, about 40 miles southeast of Houston, also injured more than 170 people.

Until now, the largest fine OSHA had ever assessed was $21 million, also against BP in connection with the same refinery accident.

The latest sanctions come as BP contemplates environmental protection law fines of up to $21 billion arising from the Gulf oil spill, depending on how many barrels have spilled.

