(AP) — An American Airlines mechanic is accused of sabotaging a flight over stalled union contract negotiations.

According to a criminal complaint affidavit filed in federal court, Abdul-Majeed Marouf Ahmed Alani admitted during an interview Thursday that he tampered with a navigation system on the plane so that he could collect overtime work.

The plane, with 150 people on board, was scheduled to fly from Miami to Nassau in the Bahamas on July 17. As the pilots powered up the plane at Miami International Airport, they saw an error message for a system that tracks speed, nose direction and other critical flight information and aborted the takeoff.

When mechanics examined the plane, they found a piece of foam glued inside a navigation system part called an air data module. Video from an American Airlines surveillance camera captured a person who drove up to the plane, got out and spent seven minutes working around the compartment containing the navigation system, according to the affidavit.

The person was later identified by co-workers as Alani, in part by his distinctive limp, the affidavit said.

When he was interviewed Thursday, “Alani stated that his intention was not to cause harm to the aircraft or its passengers,” according to the affidavit by Jose A. Ruiz, a federal air marshal who serves on an FBI terrorism task force.

Alani explained that stalled contract negotiations between American Airlines and the mechanics’ unions were hurting him financially, and he tampered with the plane “to cause a delay or have the flight cancelled in anticipation of obtaining overtime work,” Ruiz wrote.

American has accused mechanics of an illegal work slowdown that has led to hundreds of canceled flights in recent months. The airline successfully sued two unions that represent the workers. This week, both sides announced that they will resume negotiations Sept. 16 in Washington, with help from a federal mediator. The mechanics’ unions have been trying to secure a new contract for more than three years.

In a statement, American Airlines said it cooperated fully with the investigation “and we are taking this matter very seriously.” The Fort Worth, Texas-based airline said the plane was taken out of service after the July incident and repaired and inspected before it was allowed to fly again.

Alani was charged with willfully damaging or disabling an aircraft. He is expected to appear in federal court in Miami on Friday.