An American Airlines mechanic has been arrested on a sabotage charge for allegedly disabling a navigation system on a plane with 150 people aboard because he was upset over stalled union contract negotiations, according to a report.

The pilots of Flight 2834 aborted their takeoff on July 17 when the tampering sparked an error alert as they powered up the plane’s engines at Miami International Airport for its flight to Nassau in the Bahamas, according to the Miami Herald.

Abdul-Majeed Marouf Ahmed Alani, 60, of California, was charged with “willfully damaging, destroying, disabling or wrecking an aircraft, and attempting to do so.” He was scheduled to make an initial appearance in Miami on Friday.

Alani was accused of gluing foam inside a tube leading from outside the plane to its air data module, which reports the speed, pitch and other critical data. If the plane had taken off, the pilots would have had to fly manually because the system would not have received computer data.

The sabotage was discovered when another mechanic inspected the plane at the airline’s hangar and found a loosely connected tube in front of the nose gear that had been deliberately obstructed, the Herald reported, citing a criminal complaint affidavit filed in Miami federal court.

Alani told federal air marshals assigned to the FBI’s Joint Terrorism Task Force that “his intention was not to cause harm to the aircraft or its passengers.”

He said he was “upset” over stalled contract negotiations between the 12,000-employee mechanics’ union and American Airlines – a months-long dispute that had “affected him financially.”

Alani added that he only tampered with the ADM “to cause a delay or have the flight canceled in anticipation of obtaining overtime work,” the affidavit said.

Authorities zeroed in on Alani – who has worked for the airline since September 1988 – after reviewing surveillance video that captured him getting out of a truck, approaching the plane and accessing a compartment where the navigational equipment is located, the affidavit said.

The air marshals also interviewed three other airline mechanics — who were with Alani after his alleged tampering – and they helped investigators identify him from the video.

In a statement to The Post on Friday, American Airlines said the passengers were put on another plane that took them to 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,” the airline said.

The plane was returned to service after maintenance was carried out and mechanics deemed it safe, it added.

“American immediately notified federal law enforcement who took over the investigation with our full cooperation.”

No formal plea was entered Friday pending a bond hearing Wednesday.

The feds have until Sept. 20 for a grand jury to return an indictment.

“We won’t know until the 20th what the formal charges will be,” said Alani’s public defender, Anthony Natale, according to CNN.

The plane was returned to service after maintenance was completed and mechanics deemed it safe, CNN reported.

With Wire Services