An American Airlines mechanic has been charged with willfully damaging, destroying or disabling an aircraft after he allegedly obstructed a tube underneath the cockpit with foam.

Abdul-Majeed Marouf Ahmed Alani reportedly sabotaged a plane at Miami International Airport one hour before takeoff in July. He allegedly wanted the flight to be canceled or delayed so he could collect extra money amid a union dispute, says NBC News.

The American Airlines plane with 150 people on board never left for the scheduled July 17 flight from Miami to Nassau in the Bahamas after flight crew noticed an error related to the "air data module" and called it off, says the news report.

He allegedly used super glue to attach a piece of foam into an inlet on the air data module, which reports information like an aircraft’s speed, pitch and other data.

American Airlines said Flight 2834 returned to the gate for maintenance, and all the passengers were put on another plane bound for Nassau.

Authorities used surveillance video to identify Alani, says CNN.

Alani previously worked for Alaska Airlines.