An 18-year-old man was arrested at the Denver International Airport last week as he allegedly attempted to travel to Iraq to fight for ISIS, the Department of Justice said Monday.

Davin Daniel Meyer was arrested by the FBI's Denver Field Office on Friday as he attempted to catch an international flight, the agency stated. Meyer allegedly pledged his allegiance to the leader of ISIS and intended to fight with the terrorist group in Iraq, but instead appeared in federal court Monday.

The arrest warrant for Meyer relied on someone he knew, who contacted Douglas County police in June 2022. The source told investigators that Meyer was previously a White supremacist, then began to practice Islam. He was allegedly later radicalized by online content and claimed to want to kill himself and others.

ISIS SUPPORTER WHO PLANNED MASS SHOOTING IN FLORIDA SENTENCED TO 18 YEARS: ‘DANGER TO THE UNITED STATES’

A ISIS soldier and flag

An 18-year-old man was arrested at the Denver International Airport for his alleged ties to ISIS, the Department of Justice said Monday. (Pictures from History/Universal Images Group via Getty Images)

"In October 2022, the individual informed the FBI that Meyer had stated that if he could not go to the Middle East, he planned to get fertilizer and build a bomb in the United States," said the affidavit, reported on by Fox31 in Colorado.

The next month, the affidavit states, Meyer made contact with someone who he thought was an ISIS facilitator. He then pledged allegiance to ISIS while in contact with that person, who was an undercover agent. He made another pledge to ISIS after its leader was killed and replaced.

Meyer then began saving money for a trip to Iraq to fight for ISIS. He used an allowance from his mother to purchase a flight for Turkey, then was arrested on the jet bridge at the airport by federal agents.

NEW YORK MAN WHO ACTED AS ISIS RECRUITER SENTENCED TO LIFE IN PRISON 

ISIS militant, Syria, U.S. military

A fighter of the Islamic State of Iraq and the Levant holds a flag and a weapon on a street in the city of Mosul, June 23, 2014. (Reuters Photo)

Meyer attended an "eight-month-long camp between 2021 and 2022 that focused on mental health and behavior treatment," according to the affidavit. He was diagnosed with "autism spectrum disorder; attention-deficit hyperactivity disorder; adjustment disorder with mixed anxiety and depressed mood; specific learning disorder with impairment in mathematics; and major depressive disorder, recurrent episode, moderate."

Meyer cited his religious beliefs to refuse medications for his mental disorders.

AT LEAST 41 WERE KILLED IN AN ISLAMIC EXTREMIST ATTACK AT UGANDA SCHOOL 

FBI logo and seal seen below the American flag

Davin Daniel Meyer used an allowance from his mother to purchase a flight for Turkey, then was arrested on the jet bridge at the airport by the FBI. (AP Photo/Jose Luis Magana, File)

A local mosque allegedly said Meyer violated their code of contact when he reached out with complaints that they allowed women.

CLICK HERE TO GET THE FOX NEWS APP

The FBI Denver Field Office is investigating the case along with the Douglas County Sheriff’s Office.