Oil giant BP will reimburse $58.25 million to the Louisiana Attorney General’s Office for its expenses, fees and litigation costs tied to the 2010 Deepwater Horizon disaster that caused millions of barrels of oil to spew into the Gulf of Mexico.

The money was included in BP’s record settlement of more than $20 billion that was formalized last week between the federal government and five Gulf Coast states involved in the sprawling litigation.

Louisiana is set to receive about $6.8 billion, the largest piece among the states. That includes $5 billion to be spent repairing the spill’s damage to natural resources, money that will largely go to coastal restoration and repairing wetlands and damaged wildlife habitats.

Another $1 billion will be used to cover the state’s economic losses from the spill. The state also will receive $787 million of BP’s Clean Water Act penalties, which also is expected to be used to repair natural resources. Apart from the $6.8 billion apportioned directly to Louisiana, the deal also called for up to $1 billion to be spent resolving loss claims with local governments across the Gulf Coast, including those in the Pelican State.

The settlement also calls for Louisiana to receive $20 million to cover its litigation costs, and another $38.25 million will go for expenses tied to the Natural Resource Damage Assessment process. That involves state and federal agencies working with BP to determine the cost of repairing damage to the environment.

After the settlement’s broad terms were unveiled three months ago, some legal watchdogs questioned whether Attorney General Buddy Caldwell’s office relied too heavily on outside lawyers to win Louisiana’s share of the proceeds. It wasn’t the first time Caldwell has caught criticism for doling out work to other attorneys — many of whom have donated to his campaign — rather than sticking with in-house counsel.

Now, the state is being made whole for its litigation costs in addition to the money it is receiving from BP from the settlement, said Trey Phillips, a first assistant attorney general in Caldwell’s office.

Under a consent decree filed in federal court last week, BP agreed to pay $350 million for previously unreimbursed NRDA costs, including two payments of more than $19 million destined for Louisiana. The decree is still subject to court approval following an upcoming public comment period.

In addition to Louisiana’s share of the settlement, Florida will get $3.25 billion; Alabama, $2.3 billion; Mississippi, $2.2 billion; and Texas, $788 million.

Florida was reimbursed $52 million for its legal fees, the highest amount among the five states, but it did not receive any additional money in NRDA costs, according to court filings.

The Alabama Attorney General’s Office and its outside lawyers hired to represent the state also received $20 million from BP, according to the settlement.

Follow Richard Thompson on Twitter, @rthompsonMSY.