WASHINGTON (Reuters) - An American Airlines mechanic was ordered temporarily detained Friday after he was charged with purposely damaging an aircraft in July amid a dispute between the airline and its mechanics union involving stalled contract negotiations.

Abdul-Majeed Marouf Ahmed Alani will remain in custody pending a hearing on Wednesday, the U.S. Attorney’s Office said. Federal prosecutors are requesting he continue to be detained pending trial.

Pilots of a flight from Miami to Nassau, Bahamas, on July 17 aborted takeoff plans after receiving an error message involving the flight computer, which reports speed, pitch and other data, according to a criminal complaint filed on Thursday in U.S. District Court in Miami.

It said after returning to the gate for maintenance, a mechanic discovered a loosely connected pitot tube, which measures airspeed and connects directly to the flight computer.

A later review of video surveillance footage before the flight captured “what appears to be the sabotage of the aircraft” by a man walking with a limp, the complaint said.

When Alani was interviewed, he told law enforcement he was upset at the stalled contract between the union and American, which he said had affected him financially, according to the complaint. It said Alani claimed to have tampered with the aircraft to cause a delay or have the flight canceled in anticipation of obtaining overtime work.

Unions have complained that American is trying to outsource more maintenance jobs, a move American has indicated is necessary to cover increased wages.

In a statement bit.ly/2N09Na8 on Friday, American said it was scheduled to resume negotiations with its mechanics union at the National Mediation Board in Washington, D.C. on Sept. 16.

A U.S. federal court last month issued a permanent injunction against American’s mechanics union, which the airline had accused of illegal slowdowns it said had devastated its operations during the peak summer travel season.

A spokesman for American said the airline had an “unwavering commitment” to safety and security and had placed passengers on the July 17 flight subject to the criminal complaint on another plane to get to their destination.

“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,” the spokesman said. “American immediately notified federal law enforcement, who took over the investigation with our full cooperation.”

Court records do not indicate whether Alani had an attorney.

The U.S. federal court order last month prohibits employees from “calling, permitting, instigating, authorizing, encouraging, participating in, approving, or continuing any form of disruption to or interference with American’s airline operations,” including a refusal to accept overtime or complete any maintenance repairs in the normal course of work.

U.S. Senator Marco Rubio of Florida on Friday wrote on Twitter that on two days last week he had American flights canceled at the last minute because of mechanical issues and “now we learn an American mechanic was caught sabotaging planes due to labor dispute.” He added he wants mechanics to get a fair contract.