SAN JUAN, Puerto Rico (AP) — A federal judge on Wednesday approved a plan to restructure some $6 billion of debt held by Puerto Rico’s Highways and Transportation Authority as the U.S. territory emerges from bankruptcy.

The plan cuts the agency’s debt by more than 80% and saves Puerto Rico more than $3 billion in debt service payments, according to Gov. Pedro Pierluisi and a federal control board that oversees the island’s finances.

“The plan creates a solid financial foundation to ensure Puerto Rico’s roads and public transportation are maintained and improved,” the board said.

It has previously noted that 13% of the island’s highways are in good condition, compared with a median of 84% in the U.S. mainland.

Only one government agency on the island has yet to restructure its debt: Puerto Rico’s Electric Power Authority, which holds some $9 billion in debt, the largest of any public agency.

Federal Judge Laura Taylor-Swain recently ordered a new round of mediation talks to resolve that debt after the previous talks failed. She also allowed the board to go to court to determine how much money bondholders seeking to recover their investments should receive.

The debt restructurings come after Puerto Rico’s government announced in 2015 that it was unable to pay its more than $70 billion public debt load. In 2017, it filed for the biggest U.S. municipal bankruptcy in history.