MONTREAL -- Air Canada says Quebec has agreed to drop its lawsuit against the airline in exchange for a commitment to have heavy maintenance work on its planned fleet of Bombardier's CSeries planes carried out in the province.

The company says the work would be done for a minimum of 20 years, beginning in 2019.

Air Canada's announcement Wednesday -- subject to completion of final agreements -- came hours after it revealed that it has a letter of intent with Bombardier to buy up to 75 CSeries aircraft.

The Quebec government launched the lawsuit against Air Canada after Aveos Fleet Performance, which did much of Air Canada's aircraft maintenance, closed in 2012 in a move that laid off 2,600 employees, including about 1,700 in Montreal.

The province argued that Air Canada (TSX:AC) breached its legal obligations under the 1988 Air Canada Public Participation Act, which required the airline to keep heavy maintenance operations in Quebec, Ontario and Manitoba.

Quebec won the original court decision in 2013 and the Quebec Court of Appeal decision in November.

Last month, Air Canada asked the Supreme Court of Canada to overturn the appeal court ruling.

Transport Minister Marc Garneau said the end of the lawsuit will allow the federal government to "clarify" the Air Canada Public Participation Act to avoid future litigation.