(Recasts story with statement from federal labor minister paragraphs 1-3, reaction from union paragraph 4, background paragraphs 5-6)

OTTAWA, June 27 (Reuters) - Canada's federal government intervened on Thursday to prevent a strike by maintenance engineers at WestJet Airlines, the country's second-largest carrier, to avoid more flight cancellations ahead of a busy holiday weekend.

Labour Minister Seamus O'Regan said he had ordered the country's industrial relations board to impose final binding arbitration in the dispute between the airline and the Aircraft Mechanics Fraternal Association.

"The parties still remain far apart today, and tensions have only increased," he said in a statement.

The union said there was no modern precedent for the move, adding it would comply with the order and direct its members to refrain from any unlawful job action.

WestJet said on Wednesday it had begun canceling flights ahead of the strike, which could have started on Friday. Monday is Canada Day, one of the country's most important holidays.

WestJet, which is backed by Onex Corp and competes with Air Canada, has been facing demands from employees for better working conditions and higher salaries. (Reporting by David Ljunggren; Editing by Jamie Freed)