This photo shows a Delta jet taxing for take-off at the Salt Lake International Airport in Salt Lake City, Utah, Aug. 12, 2005. Getty Images/George Frey

Delta Air Lines officials allegedly trapped their flight attendants on a delayed plane to prevent them from walking off after they maxed their weekly working hours. The incident took place May 12 on a flight from Atlanta to Toronto.

According to the Huffington Post, the flight was grounded for three-and-a-half hours following a maintenance problem. As the airline tried to resolve the issue, the plane doors were kept shut because a Delta official was worried the flight attendants would soon hit their maximum duty hours.

"Do not open the door flt attendants out of time and none available... let (maintenance) do their work without opening door thanks," the internal server message viewed by the Huffington Post said.

Thirty minutes later another message read: "Ok… if door is not closed by [11 p.m.] Flt attendants walking. We will most likely have to delay flight until morning if this happens."

A flight attendant listed as "flight leader" said in the correspondence that they knew the operations team was trying to "trap" them on the plane, even though the attendants were willing to work voluntarily.

"Since we are deciding to stay although y’all are trying to trap us on the plane, and now our layover has been shortened and we will be past our duty day, hungry and tired. It would be nice to have a deadhead at some point tomorrow," the flight leader said.

A later message said: “We are ready to walk literally, Doing the operation a huge favour.”

In a statement, Delta said the crew could have walked if they wanted to, but decided to stay and work. The flight attendants received additional pay for working longer hours.

"Operating an airline is a team effort and the guidance shared in this exchange does not reflect the respect and collaboration we expect of our employees when making operational decisions. Delta's unique culture is built on supporting one another and that didn't happen in this case. We have followed up directly with the team members involved to address this situation," it said.