A Queens man is facing charges for allegedly trying to join the Islamic State militant group.

Ali Saleh, 22, was arrested in the Jamaica section of Queens Thursday morning and appeared in federal court in Brooklyn Thursday afternoon.

He is accused of attempting to provide material support to the Islamic State.

The U.S. Attorney's office says Saleh made multiple attempts to travel to the Middle East to join the Islamic State in the past year.

Officials say Saleh made posts on his Twitter account saying he was ready to die for the Islamic State.

In August 2014, he booked a flight to Istanbul, but was unable to travel.

This past July, Saleh allegedly booked a flight to Egypt the same day he contacted an Islamic State facilitator, but he was denied boarding. 

Officials say he continued to book flights from Newark Liberty International and Philadelphia International Airports, but was never allowed to fly. 

He also tried to take an Amtrak train from Ohio to Toronto in hopes of getting to the Middle East before he was arrested.

"According to the complaint, he was attempting to travel overseas to join ISIL, to join up with ISIL. That's the allegation," said Susan Kellman, Saleh's defense attorney. "It's an informal charge. There's no need for him to respond, and he didn't. And he was held without bail, as is pretty common with these cases."

Saleh was informed of the charges Thursday, but he was not formally charged, so he did not have to enter a plea. His attorney says if convicted, he faces up to 15 years in prison.