A senior pilot with budget airline Ryanair has resigned after allowing two off-duty cabin staff to fly from Spain seated in the toilets.
Ryanair said the incident was unprecedented in its history
The captain let the crew members fly from Girona to Dublin, even though the flight last Sunday was fully booked.
Ryanair says it sacked both cabin crew, who were returning from a holiday, after they refused to resign.
The Irish Aviation Authority has now launched an investigation into the incident.
Ryanair said it had launched an internal investigation over the past five days, and would also co-operate fully with the IAA.
A Ryanair spokesman said: "As a result of this investigation, the captain has tendered his resignation from the airline with immediate effect."
The two crew, who had been on holiday in Barcelona, were allowed to sit in the plane's rear toilets because there were no other seats.
The spokesman said both were senior staff members, and "therefore fully aware of our seating and boarding regulations".
They had "refused an offer to resign, and have been dismissed for gross misconduct", he said.
He added that the captain was fully aware of the incident and that it was in breach of boarding and operating procedures.
A spokeswoman for the IAA said: "We have started an investigation into the matter and it is something that we are taking very seriously."