FILE PHOTO: The Philadelphia Energy Solutions oil refinery owned by The Carlyle Group is seen at sunset in Philadelphia March 26, 2014. REUTERS/David M. Parrott/File Photo

(Reuters) - A federal bankruptcy judge approved a settlement on Wednesday between Philadelphia Energy Solutions and the U.S. Environmental Protection Agency allowing the refiner to shed a significant portion of financial obligation under the nation’s biofuel laws.

The approval marks the end of a break-neck-pace bankruptcy that began in late January, when the Carlyle Group-backed company sought Chapter 11 relief and blamed the costs of complying with the U.S. Renewable Fuel Standard (RFS) for its financial woes.

“This is another important milestone in our quest to strengthen our financial foundation and ensure that PES can successfully emerge from the restructuring process,” the company said in a statement.

The RFS requires refiners to blend biofuels such as ethanol into their fuel or buy credits, known as RINs, from those that do.

PES needed to submit some 470 million credits to the EPA to prove compliance for 2016 and 2017, but only had 210 million on hand. The refiner said it did not have the money to go into the market and buy the additional credits.

Under the settlement agreement, PES was only required to turn in the credits it had acquired to prove compliance, including a portion of this year’s credits, saving close to $200 million.

Reuters reported that other factors may also have played a role in the company’s bankruptcy, including the withdrawal of more than $590 million in dividend-style payments from the company by its investor owners.

The settlement angered the biofuel industry, which said it rewarded a company for ignoring the law. Growth Energy, a pro-biofuels trade group, sought to intervene in the bankruptcy and force Carlyle CG.O to pay the outstanding compliance costs.

“The EPA’s sue-and-settle-style settlement will give the Carlyle Group a free pass for skirting the law, even after they neglected the refinery while pocketing hundreds of millions of dollars in cash payouts” Emily Skor, Growth Energy’s chief executive officer, said in statement.