A bankruptcy judge approved a chapter 11 exit plan for Latam Airlines Group SA that puts $5.44 billion of fresh capital into the Chilean business, moving it closer to ending its pandemic-driven restructuring after two years.

Judge James Garrity of the U.S. Bankruptcy Court for the Southern District of New York said the chapter 11 plan resulted from “good faith, arm’s-length negotiations” among Latam and its stakeholders and provides the best available path to resolve its bankruptcy case.

He also said the financial restructuring aims to maximize the value of Latam, the largest airline in Latin America, which filed for chapter 11 in New York in 2020 as pandemic restrictions shut down air travel in the region.

Latam is handing control to major unsecured creditors including Sixth Street Partners, Strategic Value Partners LLC and Sculptor Capital Management, which agreed to backstop $3.67 billion of a planned capital raise. Current shareholders of Latam, including Delta Air Lines Inc. and Qatar Airways, will guarantee another $1.77 billion in common stock and convertible notes, while retaining minority stakes in the business.

Latam said it expects to complete the chapter 11 process by the end of this year and will focus in coming months on the remaining steps to emergence, which include obtaining the necessary legal and regulatory approvals in Chile.

The judge’s approval follows a breakthrough settlement in May that brought objecting creditor representatives on board with Latam’s plan and gave Chilean bondholders rights to participate in the capital raise.

Other unsecured creditors continued to object, saying that Latam offered unreasonably large compensation to certain investment firms but not others. Sixth Street, SVP and other major creditors will collect $734 million in cash fees for their pledge to backstop the capital raise—meaning to purchase any securities that might otherwise go unsold.

Objecting creditors argued that Latam paid those fees to buy creditor votes on a chapter 11 plan that wouldn’t otherwise pass muster.

Judge Garrity disagreed, saying Saturday that Latam wasn’t treating similarly situated creditors differently because the backstop fees are being paid in return for new investments in the business, not on account of prebankruptcy debt claims.

The judge had already found in March that the $734 million of fees were reasonable given the risks of investing in Latam, including fuel-price volatility and future Covid-19 restrictions.

Latam is the largest Latin American carrier by fleet size as well as the number of passengers.

Saturday’s ruling left open the possibility of further challenges to the restructuring in Chile, according to Latam shareholder Columbus Hill Capital Management LP, which also objected. It argued that the bankruptcy plan violates Chilean laws that give shareholders of a Chilean company priority rights over others to buy newly offered securities.

Under Latam’s plan, the pricing of the notes is set lower for creditors compared with the rates available for existing shareholders, according to Columbus Hill, a New Jersey-based investor. Judge Garrity said the plan “does not clearly, if at all, violate Chilean law,” but acknowledged there is “legitimate debate” over the issue and that it isn’t for him to rule on.

Paul Silverstein, attorney for Columbus Hill, said Judge Garrity’s decision “declined to address whether the plan violates, or complies with, Chilean law,” leaving the issue up to the Chilean courts or regulators. Latam said it expects its plan to be approved in Chile even if it is challenged there.

Write to Akiko Matsuda at akiko.matsuda@wsj.com