Within hours of the news on September 15 that thousands of Ryanair flights had been cancelled in Europe, pilots' WhatsApp groups exploded with pent-up frustration. 

While management explained away the cancellations as a one-off rostering screw-up, pilots believed there was a deeper problem - that disaffected colleagues were leaving in droves. 

The pilots saw an opportunity to shift the balance of power in a company where they feel they are treated, in the words of one serving captain, "like janitors". 

A hectic five days of Facebook and WhatsApp exchanges and meetings later, representatives of 20 of Ryanair's 87 bases were demanding new contracts. 

In December, pilots in Italy, Ireland and Portugal called strikes that would have been the first of their kind in the airline's history. 

"The discontent has always been there - but the cancellations triggered everyone to mobilise," one pilot said. 

Their manoeuvre worked. On December 15, Ryanair chief executive Michael O'Leary recognised unions for the first time, crossing what for him had always been a red line. 

The full implications of union recognition for Ryanair's pioneering ultra low-cost business model will take months to become clear. The market's view was immediate - its shares fell 9% in a single day. 

In his first interview since the cancellations, O'Leary told Reuters the decision did not indicate management weakness or pilot strength but the fact that the airline was facing the prospect of compensating 150,000 passengers in Christmas week. 

"If you need to go on strike just to test our mettle, then go ahead," Michael O'Leary said in his Dublin office on Tuesday. 

"But not in Christmas week. And not one that disrupts all our customers across Europe," he added.

The blunt-speaking CEO, who once crossed a picket line of baggage handlers to help load a plane, also indicated a grudging respect for the pilots: "In fairness, their timing was good."

Analysts have been concerned that rising staff costs could destroy one of the main pillars of the airline's cost advantage, pushing it into the crowded middle ground occupied by EasyJet and restructured legacy carriers such as Air Lingus.

Michael O'Leary counters that a "tiny proportion" of its advantage over rivals is due to staff costs. "There will be an uptick in labour costs next year, but will it alter the model? No."

The first signs that something was awry at Ryanair came in early summer, according to union officials and three pilots who asked not to be named because their contracts forbid them to talk to the media.

By May, the rostering department had begun calling pilots to ask them to work during their annual month off, a first. 

Calls on days off also increased in frequency and on short notice, measures one pilot said were seen as a sign of "desperation."

"From the start of the summer schedule there were very, very clear signs that there issues in crew control," said the pilot, a captain who works at a base in northwest Europe.

O'Leary acknowledged in the interview that there were "all these little bits of mismanagement", including training pilots being sent to fly passengers and a backlog of newly hired pilots unable to fly.

By mid-summer, punctuality was suffering. In-house statistics show the number of flights arriving on time deteriorated from 91% in April to 83% in July, its worst level since 2010. 

In early September, it had collapsed to the mid-60s, causing cascading delays and cancellations. 

Management put out a call on September 13 offering pilots more money to work extra days, with management "not quite realising how serious it was," O'Leary told Reuters. 

Two days later, Ryanair bowed to the inevitable and announced the cancellations. 

Management has maintained the problem was triggered by a regulatory change. Starting in 2018, Irish airlines will have to calculate pilots' annual 900-hour flying time limits on the basis of the calendar year, like the rest of the European Union, rather than the customary April to March. 

The rostering department responded by over-allocating annual leave in the final four months of 2017, which meant almost half of the company's pilots took a month off between September and December compared to 40% in a normal year, O'Leary said. 

Many pilots believe the key factor was the high number of pilots leaving, and questioned management's distinction between a "standby pilot shortage", which it admitted, and a "pilot shortage", which it denied. 

O'Leary told investors on September 18 that the annual turnover among Ryanair's 4,400 pilots was less than 5%. 

On Tuesday, however, he admitted turnover had reached "high single digits" for captains and "low teens" for First Officers in 2017, more than double the churn rate of below 4% reported by EasyJet. 

The number of pilots leaving has "undoubtedly stepped up this year," O'Leary said. "The uptick in First Officer resignations is highly unusual." 

After the September cancellations O'Leary announced an extra €10,000 a year to pilots in several bases and "goodies" to pilots at others. If pilots misbehaved, however, "that will be the end of discussion on goodies," he said. 

The approach did not have the desired effect and a week later the airline was forced to cancel another 18,000 flights and cut its growth plans, grounding 25 planes in the winter and 10 next summer. 

While management was suffering setbacks, the pilots were growing in confidence. 

By the end of September, they had set up an unofficial pan-European body with its own web site and WhatsApp group, allowing information to be shared instantly among a majority of pilots for the first time. 

In October, the airline made its next move, hiring back its former director of flight operations, Peter Bellew, after just over a year as CEO at Malaysia Airlines to lead a "significant transformation in the way we reward and interact with our pilots." 

In a meeting with pilots in London in mid-December, Bellew conceded the airline had lost pilots' trust, according to a recording of the meeting. 

The airline's administrative staff appeared determined to give pilots a hard time, he said. 

"With the anger there is around the place, if we don't manage to turn that around, we're going to lose more people, so we need to change that," Bellew said. 

Michael O'Leary made it Ryanair's trademark to treat pilots more like bus drivers than what he saw as the pampered rock stars of aviation's golden age. 

While Ryanair says it pays some of the highest salaries in the sector, pilots counter that pay varies widely. 

They cite a "toxic" culture that included making them pay for uniforms, training and snacks on planes. 

"Everybody you talk to is either in an interview process or looking," the captain based in northwestern Europe said. 

But they said Ryanair could become a very attractive employer if pilots were allowed to conduct collective bargaining that would provide them with legally binding fixed conditions. 

The airline's system of 5 days on, 4 days off, combined with its large pool of base cities, was a winning formula, they said. Management cited the potential for rapid promotion and one of the youngest fleets in Europe as other pull factors. 

"There will be a mass exodus if they don't implement genuine collective bargaining for pilots," the captain based in southern Europe said. "If they start to change things, they will hold on to a lot of people."