An American Airlines Group Inc. mechanic pleaded guilty to attempted destruction of an aircraft for tampering with a critical flight-monitoring device on a jet in Miami.

Abdul-Majeed Marouf Ahmed Alani, 60, entered the plea Wednesday in federal court in Miami to a single count, the U.S. Attorney for the Southern District of Florida said in a statement.

Alani told investigators that he was upset over stalled contact talks and didn’t intend to harm the plane or its passengers in the July 17 incident.

Court records indicated his brother may have been involved with the Islamic State group and he had videos on his phone depicting mass murders, the Associated Press reported, citing court records.

He was charged with a single count of attempted destruction of a plane, but not any terrorism-related crimes. The charge carries a maximum sentence of 20 years.

Alani inserted a piece of foam into a device known as the air data module, which is used to compute a plane’s speed and then distributes the information to flight computers, according to prosecutors. Pilots of the Boeing Co. 737 got an error message in the cockpit and aborted their takeoff.

The plane, bound for the Bahamas, had 150 people aboard.

“His conduct is not representative of the world-class work performed every day by our 15,000 Technical Operations safety professionals,” American said in a statement. “American Airlines has fully cooperated throughout the investigation. After we learned about the allegations, we inspected aircraft that Mr. Alani had worked on to ensure that they were safe.”