NEW YORK – An Indian American man, Shivam Patel, 27, of Williamsburg, Virginia, was charged with one count of making materially false statements on applications to join the military as he lied about his trips to China and Jordan on his application to join the U.S. Army and Air Force.

Patel, a Hindu man who converted to Islam a few years ago, said that he wanted to join the “Muslim Army” and commit a peaceful jihad explaining that he went to Jordan to find like-minded people but ended up getting arrested there and deported back to the U.S.

According to The Virginian Pilot, an affidavit unsealed on Thursday in the U.S. District Court said that before going to Jordan, Patel had flown to China in July last year to teach English but instead completely covered up the whole matter saying that he had not been out of the country in seven years except for a family trip to India in 2011-2012.

“He wanted to blend into society and do something ‘glorious,’” FBI Special Agent Thomas Pembroke wrote in the affidavit.

Patel’s parents told the FBI that he had become “obsessed with Islam” when they found out that he had been captured in Jordan.

After investigators searched Patel’s room and computers, with his parents’ permission, they found evidence that he had researched how to beat a polygraph, had downloaded three copies of an online magazine produced by the Islamic State and had searched for how to join the group, the affidavit said.

The affidavit also stated that Patel had boarded a flight to Chicago on Sept. 2 and spoke with an undercover FBI Task Force Officer that same day while he praised the terrorist attacks that had taken place in Paris, Nice and Orlando and expressed an admiration for Anwar al-Awlaki, a leader of al-Qaida in the Arabian Peninsula.

He then spoke to a “confidential human source” in Detroit the next day where he expressed a desire to do something “bigger, better and more purposeful,” like dying for Allah.

The Virginian Pilot also reported that Patel had spoken to the source again the day after explaining how he would love to see a holy war between Muslims and non-Muslims and even sang an Islamic State fight song while he recalled making a replica of the group’s flag, which he wanted to replace his neighbor’s American flag with.

On Sept. 6, Patel returned to Williamsburg to apply for job with the military as well as some paramilitary organizations.

He then contacted the source one last time on Sept. 23 to express his support for Maj. Nidal Hasan, who fatally shot 13 soldiers in 2009 while serving at Fort Hood in Texas, calling the attack “completely justified” as he believed that Hasan died a martyr and he wanted to become one too.

Patel was sentenced on June 30 and will face five years in jail.