Image copyright Reuters

An American Airlines mechanic has been charged with damaging an aircraft in July as he was allegedly "upset" over stalled union contract negotiations.

The plane, with 150 people on board, was scheduled to fly from Miami to Nassau in the Bahamas on 17 July.

But it aborted take-off after the pilots received an error message about the flight computer.

Upon inspection, a piece of foam was found glued inside a navigation system part which stopped it from functioning.

Suspect Abdul-Majeed Marouf Ahmed Alani told police he had tampered with the system to cause a delay or have the flight cancelled so that he would get overtime work, according to a criminal complaint filed in a Miami court.

He did not intend to cause any harm to either the plane or the passengers, he is quoted as saying in an affidavit included in the complaint.

According to the complaint filed on Thursday, Mr Alani glued the foam inside the tube leading from the outside of the plane to its air data module, a system that reports aircraft speed, pitch and other critical flight data, the Miami Herald reports.

He was upset at the stalled contract dispute between the union and American Airlines, which he said had affected him financially, according to the complaint.

The mechanics' union has been trying to secure a new contract with the airline as the company outsources more maintenance jobs in a bid to curb costs.

A federal court last month issued a permanent injunction against the union to stop it from interfering in the airline's operations.

American accuses the mechanics of undertaking illegal work slowdowns over the summer period which led to flights being cancelled.

Mr Alani is expected to appear in federal court in Miami on Friday.