An aircraft maintenance worker at Miami Airport tampered with a critical piece of hardware in a passenger aircraft in order to get overtime pay.

An American Airlines passenger plane scheduled to fly from Miami to Nassau, Bahamas, failed to take off at its scheduled time on July 17, as there was an error in the “air data module,” which was tampered by Abdul-Majeed Marouf Ahmed Alani, an aircraft maintenance mechanic, Miami Herald reported citing court affidavit documents.

Alani, 60, allegedly stuck a piece of foam in the air data module’s inlet using glue. He was charged with willfully damaging, destroying, disabling or wrecking an aircraft, and attempting to do so, according to court documents.

Alani, who was arrested Thursday, told federal air marshals assigned to the FBI’s Joint Terrorism Task Force that the stalled contract dispute between the union and the airline had hurt him financially. He added that he never intended to do any harm to passengers.

After the pilots notified the error in the air data module, a system which reports on flight speed, pitch and other data, crews took the plane to an Ameircan Airlines hangar. During inspection the the piece of foam came to light. A mechanic found a loosely connected tube underneath the cockpit which was deliberately obstructed with some kind of foam.

American Airlines
This photo shows American Airlines hangers at Laguardia Airport in New York City, on Dec. 8, 2010. Getty Images/Bruce Bennett

Investigators began suspecting Alani, after reviewing video footages where he was seen approaching the compartment which housed the navigation system, according to the affidavit filed at the U.S. attoryney's office.

"On July 17, flight 2834 from Miami to Nassau, Bahamas, returned to the gate due to a maintenance issue. Passengers boarded a new aircraft which then re-departed for Nassau. 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. 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," a statement released by the airline said.

Alani said that he only wanted the flight to get delayed or cancelled. He is expected to appear in court Friday.