A Houston native described by his lawyer as a youth engaging in “dangerous fantasy” pleaded guilty in federal court Monday to providing aid to ISIS by offering to be a martyr and spreading bomb-making knowledge.

Kaan Serclan Damlarkaya, 20, has been in custody since his arrest on Dec. 8, 2017. With his case set for trial later this year, he admitted guilt Monday to providing aid to a designated terrorist group, with the government agreeing not to pursue charges against him for unlawfully distributing explosive making information.

By agreeing to the plea agreement, Damlarkaya faces up to 20 years in federal prison, along with a $250,000 fine and possible supervised release for life.

U.S. District Judge Andrew Hanen set Damlarkaya’s sentencing for Sept. 30.

Assistant U.S. Attorney Alamdar Shabbir Hamdani detailed in court how Damlarkaya, when he was 18, sought to join Islamic State, which American authorities have deemed a terrorist group. As part of his attempts to join ISIS, Damlarkaya told someone who turned out to be confidential informant that it was “his dream to be a martyr,” Hamdani said. Absent being able to get to the Middle East to wage jihad, Damlarkaya said it was his intent to commit a terrorist act against non-Muslims in the United States.

In December 2017, shortly before his arrest, Damlarkaya purchased a plane ticket to Istanbul, set to arrive in January, likely with the intent to travel to Syria and join ISIS.

In the months leading up to his flight, mostly via social media and email, Damlarkaya communicated with various people, including confidential informants and undercover FIB agents. In online message boards, Damlarkaya traded recipes for explosives and provided detailed instructions on how to properly prepare a pressure cooker bomb with shrapnel, and tips for how to safely assemble it.

Further, Hamdani said in court, Damlarkaya urged fellow jihadists online to consider large machetes and swords if they could not afford firearms. When he was arrested and his home searched, Damlarkaya had a large machete at his bedside.

Appearing taller and broader than the baby-faced kid with a pencil mustache who appeared in court 18 months ago, Damlarkaya acknowledged his role to the judge.

“So you are pleading guilty because you are guilty,” Hanen asked.

“Yes sir,” Damlarkaya responded, stopping slightly to speak into the court microphone, his hair pulled into a neat bun.

Damlarkaya’s lawyer, Gary Tabakman, said since his arrest the young man has “significant remorse.”

“I think the unique aspect of this case is Kaan grew up in a non-religious family,” Tabakman said.

Damlarkaya’s father is Turkish and his mother Latin American. He was home-schooled so the tight-knit family could all care for his older brother, who suffers from autism.

“He was really an older brother to his older brother,” Tabakman said.

Damlarkaya’s critical error, Tabakman said, came from being too “influenced by online content.”

“It was a dangerous fantasy, which morphed into a federal case,” Tabakman said.

As of May, Damlarkaya is the tenth Texan charged in relation to supporting or attempting to join ISIS, according to the George Washington University Program on Extremism. In April, a former Plano High School student, Matin Azizi-Yarand, 18, was sentenced to 20 years in a plot to slaughter people in a North Texas mall shooting. In May, Said Azzam Mohamad Rahim was convicted in Dallas of attempting to aid ISIS.

Meanwhile, Warren Christopher Clark, a Sugar Land substitute teacher charged with aiding ISIS, remains in custody awaiting trial. In his indictment, federal prosecutors accuse Clark of slipping from Turkey into Syria in 2015 and offering to help build the Islamic State. Clark was captured in Syria by Syrian Defense Forces in late December and returned to the U.S.