The American Airlines mechanic who allegedly sabotaged a plane over a labor contract dispute was denied bail on Wednesday, after prosecutors presented tenuous links the mechanic has to terrorism.

Although he is not charged with any terrorism-related crime, the mechanic — Abdul-Majeed Marouf Ahmed Alani — has a brother in Iraq with possible ISIS links, and had wired money to Iraq and traveled there recently.

The sabotage involved gluing a piece of Styrofoam inside the nose of the aircraft that effectively disabled a component pilots depend on to gauge such things as airspeed, the pitch of the plane, and so forth. Authorities say the problem was detected just before takeoff.

Alani, a naturalized US citizen from Iraq, has worked for the airline for about 30 years.

Visit Business Insider's homepage for more stories.

A federal judge cited new evidence of potential terrorism sympathies Wednesday in denying bail for a longtime mechanic charged with sabotaging an American Airlines jetliner that prosecutors say could have caused it to crash with 150 people aboard.

US Magistrate Judge Chris McAliley imposed pretrial detention for Abdul-Majeed Marouf Ahmed Alani at the hearing in Miami federal court.

The new evidence presented by prosecutors includes that Alani has a brother in Iraq who may be involved with the Islamic State extremist group as well as statements Alani made about wishing Allah would use "divine powers" to harm on non-Muslims.

Alani, 60, also recently sent a $700 wire transfer to someone in Iraq — where he has extended family — and had videos on his cellphone depicting Islamic State mass murders he shared with others, prosecutors said. In addition, the new evidence shows Alani traveled to Iraq in March but did not disclose that to authorities after his arrest.

"You may be very sympathetic to terrorists," Judge McAliley told Alani at the hearing. "That's very disconcerting."

Alani is a naturalized US citizen from Iraq who has worked as an airline mechanic for 30 years, with no prior criminal record. He's not charged with a terror-related crime, but Assistant US Attorney Maria Medetis said the potential links to the Islamic State give rise to the possibility his actions had a darker purpose.

Alani told agents after his arrest earlier this month that, "Out of my evil side, I wanted to do something," Medetis said, adding that the statement was recorded by the FBI.

Alani is charged with sabotaging a Boeing 737 with 150 passengers and crew aboard at Miami International Airport in July because, he told authorities, ongoing labor negotiations were jeopardizing his chances at earning overtime. The aircraft did not take off and no one was injured. And Alani did work overtime to help fix the plane.

The sabotage involved gluing a piece of Styrofoam inside the nose of the aircraft that effectively disabled a component pilots depend on to gauge such things as airspeed, the pitch of the plane, and so forth. Authorities say the problem was detected just before takeoff, when an error message appeared on a screen in the cockpit and the jet returned to a gate. It was bound for Nassau, Bahamas.

Airport surveillance video showed Alani working on the aircraft's nose compartment for seven minutes. He was later identified by co-workers from that video.

Alani attorney Christian Dunham, a federal public defender, said as an experienced mechanic Alani knew the sabotage would keep the aircraft from flying and, even if it did take off, there are redundancies built in that would have kept it safe.

"We don't think they are going to be able to prove he intentionally put people in danger," Dunham said. "The plane would have been fine to fly."

Dunham asked for Alani's release on $200,000 bail, secured by family members — many of whom live in the San Francisco area — as well as former co-workers at American Airlines in Miami. Alani has been fired from his job at the airline and the Federal Aviation Administration recently revoked his certificate as an aircraft mechanic, Dunham said.

But McAliley said she could not grant Alani release on bail because of his ability to travel abroad frequently and because he might still pose a danger to the community. She also noted that Alani admitted his actions to investigators and that the evidence overwhelmingly points to his guilt.

"What you did with this aircraft was highly reckless and unconscionable," the judge said. "Certainly there was a risk of a catastrophic disaster. I think it is likely you will be convicted."

Alani is expected to enter a plea at another hearing Friday.