The FBI has arrested a Long Island, New York man who allegedly tried to join ISIS in Syria.

Elvis Redzepagic was arrested Friday at his parents' home in Commack, NBC New York has learned. He faces charges of attempting to provide material support and resources to ISIS and appeared in federal court in Brooklyn on Saturday, the U.S. Attorney for the Eastern District of New York announced.

On at least two occasions, Redzepagic traveled from New York overseas and attempted to enter Syria to try and join ISIS fighters there, investigators said.

"Mr. Redzepagic is an American citizen who has been fully cooperative with the government's investigation," his attorney Mildred Whalen told NBC New York. "We will work with Mr. Redzepagic's family to convince the court and the government that Mr. Redzepagic needs treatment and care, not imprisonment."

Redzepagic allegedly tried to enter Syria in 2015 and again last year, but failed after authorities stopped him in Turkey and Jordan, then subsequently deported him. His alleged ties to terror were discovered in early February after Suffolk County police picked him up on an unrelated violation.

He also had other ISIS-related materials on his computer and social media. In Facebook messages from October 2015, Redzepagic explicitly stated that he traveled to Turkey to "perform Jihad and join Jabhat Al-Nusra."

"This defendant made numerous attempts to travel to Syria to wage violent jihad," said U.S. Attorney Robert Capers. "We will continue to track down and prosecute individuals like the defendant before they are able to become foreign fighters or harm the United States and its allies."

In subsequent interviews with law enforcement, he allegedly admitted that he was prepared to strap a bomb to himself during the time he attempted to enter Syria from Turkey.

Redzepagic and his accomplices knowingly and intentionally attempted to provide material support to ISIS and al-Nusrah Front, an official Syrian branch of the al-Qaeda terrorist group, between July 2015 and October 2016, according to a criminal complaint.

Authorities say the 26-year-old boasted about having a cousin who fights alongside jihadists in Syria and pointed to photos online purportedly of his relative. It's unclear whether the claim has been verified.