British Airways lost a U.K. court bid to halt a pilot strike, in a ruling that may clear the path for walkouts at the height of the busy summer travel season.

Wednesday’s decision raises the risk of the airline’s first pilot strike in about four decades, in a dispute about pay, profit sharing and a stock-awards program.

Brian Strutton, general secretary of the British Airline Pilots Association, said the union will resume talks with the airline within hours. He said he hopes an agreement can be reached to avoid strikes.

A strike would add to what’s already shaping up to be a difficult summer for British holiday-makers. The pound has slumped amid growing fears of a no-deal Brexit, leaving tourists with less to spend on their trips, and airlines have been hit by flight cancellations due to air traffic controller staff shortages. Ryanair Holdings Plc’s U.K. pilots are also weighing possible strike action.

Walkouts by cockpit crews are particularly disruptive to airlines because they can ground flights. Strikes at BA may threaten its attempts to cut costs and compete with discount rivals such as EasyJet Plc and Norwegian Air Shuttle ASA.

Strike Dates

Walkouts at BA could potentially begin in mid-August, because unions are required to give two weeks’ notice. “We are now free to set strike dates, however we are not going to do so,” Strutton said in court after the ruling. “If necessary, we will work through the rest of today, tomorrow and Friday to try to reach a resolution.”

A BA spokesman said it would “continue to pursue every avenue to find a solution to avoid industrial action and protect our customers’ travel plans.” It’s “disappointed that the pilots’ union, BALPA, has chosen to threaten the holidays of thousands of our customers this summer with unprecedented strike action,” he said.

The airline, owned by IAG SA, warned during the court hearings that a strike would be “enormously disruptive” and could cost it as much as 40 million pounds ($49 million) per day.

The airline had unsuccessfully argued in court that the strike ballot—where pilots backed industrial action with a 93% majority—didn’t comply with labor union law.