All of us have had a beef with the boss or disagreements and other assorted unpleasantness at work from time to time, which is the nature of being at the mercy of someone who’s in charge of your productivity, never mind whether that intersects with your happiness.

But it’s probably fair to assume that most people don’t act on those feelings and certainly don’t take it out on innocent people. Which is, unfortunately, exactly what happened recently when a disgruntled American Airlines mechanic was arrested and charged after he tried to damage a plane and ruin a flight.

According to a criminal complaint filed in federal court, Abdul-Majeed Marouf Ahmed Alani has been charged with “willfully damaging, destroying, disabling, or wrecking an aircraft, and attempting to do so.” He was allegedly trying to damage the air data module system on a commercial airliner preparing to take off back in July from Miami International Airport, which had 150 people on board and was headed for the Bahamas.

That system deals with the aircraft’s speed, pitch, and other important data.

Why did he do it? According to court documents, as noted in this CNN report, he admitted to investigators he took his actions in retaliation for a union contract dispute with the airline. More specifically, he messed with one of the plane’s systems so it wouldn’t take off on time — and so he could earn overtime pay by working on the plane.

The plane had actually started moving, and after the pilots increased power to the engines, they noticed the air data module system error and stopped the takeoff. Alani admitted what he did to investigators, who noted in the court documents that “Alani stated that his intention was not to cause harm to the aircraft or its passengers.” This all got traced back to him after mechanics worked on the plane, discovered the obvious tampering, and used surveillance footage to figure out who did it.

Here’s what American Airlines had to say about the episode:

At American we have an unwavering commitment to the safety and security of our customers and team members and we are taking this matter very seriously,” reads a statement from the airline. “At the time of the incident, the aircraft was taken out of service, maintenance was performed and after an inspection to ensure it was safe the aircraft was returned to service. American immediately notified federal law enforcement who took over the investigation with our full cooperation.