Oil and gas giant BP PLC agreed Thursday to pay $373 million in fines and restitution to end investigations into whether it manipulated energy markets and violated environmental laws, the Justice Department said.

Additionally, four former BP employees were indicted by a federal grand jury in Chicago on 20 counts of mail and wire fraud charges connected to the price-fixing scheme.BP, Europe’s second-largest energy company, will pay an estimated $50 million as part of an agreement to plead guilty for violating the Clean Air Act as a result of a 2005 explosion at its Texas City refinery that killed 15 employees and injured more than 170 others.Additionally, it will pay $20 million in criminal fines and restitution to the state of Alaska and the National Fish and Wildlife Foundation for pipeline leaks of crude oil that polluted tundra and a frozen lake in Alaska.The rest of the fines aim to punish BP for conspiring to manipulate propane prices.Federal investigators have been looking at whether BP traders tried to pump up profits by cornering the propane market, driving spot prices in February 2004 as high as 94 cents a gallon in places like New York, Pennsylvania and Illinois.Investigators alleged that traders at BP Products North America Inc. bought massive quantities of propane to be delivered over a pipeline that starts in Texas and then withheld supplies, forcing other buyers in the wholesale market to pay an unnaturally high premium.The over-the-counter market includes trades conducted on the phone or electronically in products not listed on exchanges. In the end, BP did not profit because the financial benefits of the scheme were outweighed by the unexpectedly huge costs associated with carrying it out.BP also is grappling with fallout of earlier problems, such as the Alaskan oil spill and the refinery blast that have resulted in ongoing higher maintenance costs.BP told The Associated Press the company has cooperated with authorities and will continue to do so. It declined further comment.