(Changes dateline, adds WestJet statement in paragraph 2, tweet by Canada's Labor Minister Seamus O'Regan in paragraph 7, and background)

May 19 (Reuters) - A union representing WestJet's pilots reached a tentative agreement with the Canadian airline late on Thursday, averting a strike set to begin as early as Friday that would have led to travel disruptions during the Victoria Day holiday weekend.

WestJet said on Friday it was ramping up its operations following the agreement, but will take time to completely resume services. The airline on Thursday had scrapped 31% of its scheduled flights in anticipation of the strike.

The agreement will need to be ratified by pilots in the coming days, the Air Line Pilots Association (ALPA) said in a statement, but did not mention details about the new contract.

For both WestJet and its pilots, pay was the main hurdle during the negotiations. While WestJet was pricing salaries to the Canadian market, pilots wanted to narrow the pay gap with their U.S. counterparts. Pilots also wanted better scheduling.

"This contract will also help solve many of WestJet's pilot attraction and retention issues," said Bernard Lewall, chair of the WestJet ALPA Master Executive Council.

The potential strike had sparked a blitz of negotiations in Canada's largest city Toronto with federal mediators attended by the country's Labor Minister Seamus O'Regan.

Shortly after the announcement, O'Regan tweeted: "Congratulations to both parties and our federal mediators on a good deal made."

Investment firm Onex Corp took WestJet private in 2019 in a deal valued at about $5 billion, including debt.

(Reporting by Shivansh Tiwary, Shubham Kalia, Rishabh Jaiswal in Bengaluru; Editing by Savio D'Souza and Sherry Jacob-Phillips)