CALGARY, Alberta (AP) _ AMR Corp., parent of American Airlines, agreed Wednesday to pay about $179 million for one-third of Canadian Airlines International.

The final agreement ends two years of negotiations between Fort Worth, Texas-based AMR and the troubled airline unit of PWA Corp., based in Calgary.

In return for the stake, Canadian will be linked to American's computerized Sabre reservation system and participate in frequent flyer programs.

Creditors, who hold most of Canadian's $2.2 billion debt, have also agreed to a financial restructuring that converts $510 million of debt into equity. The deal will cost 1,200 Canadian employees their jobs.