Air Canada has agreed with U.S. aviation regulators to pay $4.5 million to settle charges that it didn’t properly give refunds to U.S. travelers when it canceled or altered flights during the Covid-19 pandemic.

The settlement between the airline and U.S. Department of Transportation—which must be approved by an administration law judge—would be the largest ever by the agency’s Office of Aviation Consumer Protection. The airline would pay $2.5 million to passengers, and the remaining $2 million would go to the U.S. Treasury, the agency said in a statement on Monday.

“Today, the US Department of Transportation’s OACP is holding airlines accountable by ensuring that they treat passengers fairly when flights are significantly changed or canceled,” DOT Deputy Secretary Polly Trottenberg said in the statement.

The penalty, which would settle civil allegations brought in June, is for Air Canada’s “extreme delays in providing refunds to thousands of consumers for flights to or from the United States,” the agency said in the statement.

“Air Canada and the DOT have agreed to settle this matter without prejudice or any finding of wrongdoing,” Peter Fitzpatrick, a spokesman for the airline, said in an email. “This agreement was entered into to avoid protracted litigation as Air Canada focuses, together with all stakeholders, on rebuilding following the pandemic.”

Airline refunds became a lightning rod during the initial weeks of the pandemic in March and April 2020 as cash-strapped carriers slashed flights, governments imposed travel restrictions and consumers opted to cancel trips.

Under U.S. law, airlines must offer refunds to passengers if a flight is canceled or the carrier significantly changes the schedule. However, people who choose not to fly aren’t guaranteed refunds.

The DOT said that it plans to revise its regulations to give consumers more rights in the event of pandemics. Consumers would receive unspecified additional protection if governments issued travel restrictions, the department said in the statement.

The DOT received thousands of complaints about Air Canada’s practices and the carrier received more, according to the motion.