Mohamad Khweis after a 2010 arrest. (Fairfax County Police)

Mohamed Khweis never stood out in any particular way. The Alexandria man graduated from Fairfax County’s Edison High School, earned a degree from Northern Virginia Community College and worked as a teller at an area bank.

He racked up more than a dozen traffic citations and other petty charges, but in nearly every case, he quietly paid his fine or performed his court-ordered community service. He told a Kurdish broadcast outlet that he left the United States in December, as any American might, to travel to London.

Then, over a few months, Khweis joined and then quickly fled the Islamic State, also known as ISIS or ISIL, after which Kurdish peshmerga forces captured him. Late Wednesday, he was flown back to the United States, where he was charged with providing and conspiring to provide material support to terrorists, according to U.S. officials familiar with the case and court records.

During his first appearance in federal court in Alexandria on Thursday, Khweis, 26, appeared thinner than he had in past photos, and his head was shaved. He did not speak at the arraignment but waved to his family with a slight smile as he left the courtroom.

“It was just good to see him,” his father, Jamal Khweis, said later.

In an 11-page affidavit, FBI Special Agent Victoria I. Martinez said Khweis was “inspired to join ISIL because he saw that they had established an Islamic caliphate and were in the process of expanding it.”

Martinez alleged that Khweis moved to various Islamic State safehouses during his time abroad and admitted in an interview that he told another member of the group that he wanted to be a suicide bomber in response to a question that he thought was meant to test his loyalty.

“I have no reason to think he wanted to end his life,” defense attorney John Zwerling told reporters after the arraignment.

Zwerling said he had met only briefly with Khweis, and while it would be premature to discuss details of the case, “everything is not as it appears in the government’s filing.”

He added, “We will have the opportunity to explain the other side.”

As for the young man’s family, he said, “They love him and wanted to get him back here, and they are happy he is.”

Before he left the United States, Khweis was unknown to the FBI. But the son of a limo driver and cosmetologist described his time overseas himself in a video on Kurdish TV, saying that he ultimately decided it was not to his liking.

“I found it very, very hard to live there,” Khweis told Kurdistan 24.

Martinez alleged in the affidavit that Khweis said in an interview with investigators that he first became interested in joining the Islamic State in mid-2015 and that he conducted extensive online research, watching videos of members executing prisoners and conducting other operations. In December of that year, he flew out of Baltimore-Washington International Marshall Airport, selling his car before he went, Martinez alleged in the affidavit.

Martinez also alleged that Khweis stopped briefly in London and, while there, communicated with an extremist cleric before he moved on to Turkey and Syria. The FBI agent said Khweis created a social media account with the phrase “green bird” to signal his support for the Islamic State and that once he successfully met up with the group, he moved to safehouses with other recruits.

Khweis said that at one point, he was approached by a group from the Islamic State arm responsible for training foreign volunteers to carry out attacks in their home countries, but he did not commit to training with them, according to Martinez’s account in the affidavit.

Martinez alleged that when Khweis was detained by the peshmerga, he had three mobile phones, two bank cards and about $600 in various currencies. The FBI agent wrote that Khweis had maps of Turkey, Iraq and Syria on his electronic devices, as well as images of the World Trade Center burning on Sept. 11, 2001.

Khweis acknowledged he knew the Islamic State “used violence in its expansion of the caliphate,” Martinez wrote, but also asserted that the group “engaged in peaceful and humanitarian efforts.”

Martinez wrote in the affidavit that Khweis spoke with the FBI voluntarily and waived his Miranda rights and that he told agents his interview on Kurdish TV was not done under duress.

While U.S. prosecutors have charged at least 85 people across the country with Islamic State-related crimes, Khweis — the first American to have been captured on the battlefield — presents an atypical case.

According to a recent congressional report, more than 250 Americans have tried to get or succeeded in getting to Syria and Iraq to fight with militant groups — though that figure includes those who never left the United States. American officials, speaking on the condition of anonymity because they could be punished for speaking about sensitive intelligence, estimated recently that about two dozen have been killed in Syria and another two dozen are still fighting there.

Kurdish peshmerga forces said they first fired on Khweis when they encountered him near the border town of Sinjar, Iraq, then took him into custody.

“This is an unusual situation,” said Charles Kurzman, a sociology professor at the University of North Carolina at Chapel Hill who tracks Muslim American terrorism suspects. “It’s relatively rare, first of all, for an American to attempt to go to Syria and Iraq to join the militants. It’s even rarer for them to make it.”

According to his own account on TV and to several people who knew him, Khweis was born and raised in Virginia, his Palestinian parents having come to this country more than two decades ago. He attended Fairfax County’s Mark Twain Middle School and graduated from Edison High School in 2007.

The yearbook from his senior year lists him as having participated in no extracurricular activities. Friends have said he was a soft-spoken teenager who wore designer shoes and showed no signs of being a particularly devout Muslim.

Khweis took classes at Northern Virginia Community College from 2009 to 2014, eventually earning an associate degree in administration of justice, a college spokeswoman said. Khweis also worked as a teller at Sandy Spring Bank in Fairfax from 2009 to 2011, a bank spokeswoman said.

In the video posted on Kurdistan 24, Khweis said he traveled to Turkey via London and Amsterdam and that there he met an “Iraqi girl” in Turkey who said she knew someone who could take them into Syria. He decided to follow her, he said, and after a circuitous journey, he soon found himself undergoing intensive religious and legal instruction in Mosul.

Khweis, who said in the video that he attended American mosques infrequently, claimed he immediately regretted his decision to go with the girl, and he particularly did not enjoy his time in Mosul, the largest city in northern Iraq and the Islamic State’s main stronghold in the country.

Banned from smoking and made to study religion eight hours a day, Khweis said, he soon reached out for a friend to help facilitate his escape.

“My message to the American people is — the life in Mosul, it’s really, really bad,” Khweis said.

Adam Goldman and Julie Tate contributed to this report.