CNN  — 

A mechanic for American Airlines appeared in court Friday after he was accused of trying to sabotage a commercial airliner shortly before it was set to take off from Miami International Airport for the Bahamas with 150 people on board.

Abdul-Majeed Marouf Ahmed Alani has been charged with “willfully damaging, destroying, disabling, or wrecking an aircraft, and attempting to do so,” according to a criminal complaint filed in federal court.

Alani allegedly tried to damage or disable the aircraft’s air data module (ADM) system, which reports aircraft speed, pitch and other critical data, on July 17.

On Thursday, investigators interviewed Alani and he “admitted that he accessed the ADM” and that he “inserted a piece of foam into the ADM’s inlet where the line connects and that he applied super glue to the foam so as to prevent the foam from coming off,” the complaint says.

“Alani stated that his intention was not to cause harm to the aircraft or its passengers,” investigators say in the complaint.

The court documents say Alani told investigators that he was upset over a contract dispute between union workers and the airlines, and the dispute had cost him money.

Alani allegedly explained that he tampered with the aircraft so he could get overtime working on the plane.

As the plane went down the runway and pilots increased power to the engines, there was an error related to the ADM system and the takeoff was aborted.

The aircraft returned to the concourse and no one on board was injured, the complaint says.

American Airlines mechanics immediately inspected the aircraft and “discovered a loosely connected pitot tube, which connects directly to the ADM” and determined “the ADM appeared to have been deliberately obstructed with what appeared to be a dark Styrofoam-type material,” according to the complaint.

Authorities used surveillance video to identify Alani, the document says.

No formal plea was entered during Friday’s court hearing. A bond hearing was set for Wednesday.

The federal government has until September 20 for a grand jury to return an indictment. Alani’s public defender, Anthony Natale, has just been assigned the case. “We won’t know until the 20th what the formal charges will be.”

American Airlines, in a statement to CNN, said, “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 a 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.”

An airline spokesman said Alani has been suspended.

Alani previously worked for Alaska Airlines.

A spokesman for the airline said Alani “was an avionics technician and line avionics technician for the company. He worked for Alaska from January to August 1990, and then again from June 1998 to July 2008. Alaska does not comment on specific personnel matters of past and present employees.”

In a lawsuit Alani filed in 2010, he acknowledged he was fired from Alaska.

According to an American Airlines spokesman, Alani had worked for American since 1988. American acknowledged that he worked for both airlines, which was permitted.

Correction: Earlier versions of this story misspelled the last name of Marlene Fernandez-Karavetsos, a spokeswoman for the US Attorney's office in the Southern District of Florida.

CNN’s Rene Marsh, Greg Wallace and Mark Morales contributed to this report.