MIAMI – An American Airlines mechanic accused of disabling a navigation system on a flight scheduled to take off from Miami International Airport appeared in federal court Wednesday morning, at which time he was denied bond.

According to federal prosecutors, Islamic State group propaganda video showing graphic murders was discovered on Abdul-Majeed Marouf Ahmed Alani's cellphone.

A co-worker also told government officials that Alani had once said his brother was a member of ISIS and that he traveled to Iraq in March to visit him.

Alani's roommate, however, told authorities the trip was not to visit his brother, but had been because his brother had been kidnapped, prosecutors said.

Prosecutors said photos on his phone from his trip to Baghdad and Mosul show him smiling and posing with relatives and said he did not appear to be in distress in any of the images.

Alani was born in Iraq but is a U.S. citizen.

According to prosecutors, authorities discovered a November 2018 article that had been sent to him about one of the Boeing 737 Max 8 crashes. The article described the plane having issues with its ADM system.

Authorities said at least one of the ISIS propaganda videos was downloaded on Alani's phone and sent to another person with a message that called for Allah to "use all your might and power against the Kafir," or non-believer.

The judge said the evidence presented to her suggests that Alani may be at least sympathetic to terrorists, although his attorney said Alani is not on any terror watch lists.

According to a federal criminal complaint, Alani admitted to sabotaging the airplane July 17 as it was scheduled to fly from Miami to Nassau, Bahamas, because he was upset about stalled union contract negotiations.

As the plane was preparing for takeoff, the pilot noticed an error with the air data module system and the flight was aborted. An American Airlines mechanic later discovered a loosely connected tube that connects to the air data module system.

"Further inspection revealed the ADM appeared to have been deliberately obstructed with what appeared to be a dark Styrofoam-type material," Jose Ruiz, a senior federal air marshal with the Transportation Security Administration, wrote in the affidavit.

Upon reviewing surveillance video footage, Ruiz wrote, a man could be seen driving up next to the plane in a white pickup truck, getting out and accessing the compartment where the plane's ADM is located. The man, later identified as Alani, spent about seven minutes fidgeting with equipment in the compartment before he returned to his truck and drove away, Ruiz wrote.

When interviewed about the incident, Alani admitted to tampering with the ADM, inserting a piece of foam where the line connects to the system and then using super glue to keep the foam in place, the affidavit said.

"Alani stated that his intention was not to cause harm to the aircraft or its passengers," Ruiz wrote.

According to the affidavit, Alani claimed he tampered with the plane to cause a delay or have the flight canceled so he could obtain overtime work.

Prosecutors said he worked four hours of overtime that day.

"What you did was at minimum highly reckless. It was unconscionable," a federal judge told Alani in court Wednesday.

According to prosecutors, Alani said he tampered with the plane "out of my evil side," and admitted that he would not have allowed himself or his relatives to fly on a plane with a sabotaged ADM.

There were 150 people on the American Airlines plane when the flight was aborted.

If convicted, Alani could face up to 20 years in federal prison, his attorney said.

A spokesman for American Airlines said in a statement Wednesday that the airline is continuing to cooperate with federal authorities in the investigation.

"The safety of our customers and team members remains our top priority," the statement read.