(Bloomberg) -- Air Canada said it reached a deal with the Canadian government for loans and equity worth nearly C$5.9 billion ($4.7 billion), a package that will see the airline restore many routes it canceled because of the pandemic.The state, which sold off its ownership of the airline in the 1980s, will once again take a stake, buying C$500 million of shares at a discount. Prime Minsiter Justin Trudeau’s government will also receive warrants as part of a financing agreement that makes Air Canada eligible for five new credit facilities totaling C$5.38 billion, according to a statement.In return, Air Canada agreed to restrict share buybacks and dividends, keep employment at April 1 levels and follow through on a deal to buy 33 Airbus A220s made at a factory in Quebec. Executives won’t be allowed to earn more than C$1 million. The government’s voting rights in the company will be capped at just below 20%.The long-anticipated announcement will ease tensions between the industry and Trudeau’s government, which since last March has barred most foreign travelers from entering the country and recently made the rules even tougher.Air Canada had repeatedly complained that its home country was the only Group of Seven member without an aid plan specifically for the sector -- although the company has used federal wage subsidies available to all industries hit by the pandemic.“We wanted a good deal, not just any deal. And getting a good deal can sometimes take a little time,” Finance Minister Chrystia Freeland said at a news conference Monday evening.Air Canada also committed to paying back customers who bought non-refundable flights that they didn’t take because of Covid-19. One of the credit facilities, worth C$1.4 billion, is dedicated to financing those refunds.Freeland said talks are ongoing with other airlines, including WestJet Airlines Ltd., controlled by Toronto-based investment firm Onex Corp.“Wherever and whenever the federal government provides public aid, the supported company will have to give solid guarantees, as Air Canada did, that the public interest will be respected, workers protected, and travelers’ interest defended,” Freeland said.A number of media outlets including Canadian Broadcasting Corp. and The Globe and Mail newspaper reported earlier Monday that a financial aid package was near.As of March 18, government financing for the airline industry globally -- including loans and equity stakes in exchange for cash -- has totaled more than $183 billion, according to Ishka Ltd., an aviation finance and investment consultancy.Before Monday’s agreement, Canada’s most visible lifeline to the industry was a combined C$375 million in emergency loans to Sunwing Airlines Inc. and Sunwing Vacations Inc., a small tour operator.Air Canada said it will only draw down the new credit facilities “as required”; C$2.48 billion is unsecured.“This program provides additional liquidity, if required, to rebuild our business to the benefit of all stakeholders and to remain a significant contributor to the Canadian economy through its recovery and for the long term,” Chief Executive Officer Michael Rousseau said in a statement.(Updates with details throughout.)For more articles like this, please visit us at bloomberg.comSubscribe now to stay ahead with the most trusted business news source.©2021 Bloomberg L.P.