A San Diego man was charged Thursday with lying about his links to Islamic militants fighting in Syria after Facebook photos, posts and other evidence contradicted statements he made to federal agents, the Justice Department said.

Mohamad Saeed Kodaimati, 24, was arrested Wednesday and faces two charges of making false statements to federal officials in a terrorism investigation.

Saeed, who was born in Syria and is a naturalized U.S. Citizen, traveled to Turkey from San Diego in late 2012. He was in Turkey and Syria until he returned to the U.S. in March, according to prosecutors. He is accused of making false statements during interviews with the FBI and other U.S. authorities at the U.S. Embassy in Ankara, Turkey, in March, the Justice Department said.

Images and conversations on Facebook contradict information Saeed gave to federal officials, according to court documents.

Saeed allegedly told his associates he fought with Al-Nusrah in a four-month battle against the Assad regime. Al-Nusrah is affiliated with al-Qaida and was designated last year to be a foreign terrorist organization by the U.S. State Department.

FBI

Officials allege that Saeed originally told FBI agents and U.S. Custom and Border Protection officers that he didn’t know anyone who was a member of ISIL-- also known as ISIS-- never fired his weapon at anyone nor had been involved in any fighting while living out of the country for three years.

A photo of Saeed posted on Facebook shows him with a man who federal officials say has sworn allegiance to ISIL.

In a December 2013 Facebook chat, Saeed allegedly wrote, “I work with the brothers.”

Another photo of Saeed and his brother show them in the spring of 2014 when Saeed later admitted he had opened fire on a Syrian prison.

FBI

In initial interviews, Saeed also claimed he had never worked or volunteered at a Sharia court, prosecutors say.

Prosecutors claim a photo posted to Saeed’s Facebook page shows him wearing headphones provided to him in a Sharia court.

Saeed first came to the U.S. when he was approximately 10 years old. At 17, he became a U.S. citizen when his father naturalized, officials said.

In December 2012, Saeed left San Diego to travel to Istanbul, Turkey.

In early March 2015, when Saeed tried to fly back to the U.S., he was denied entry and told to go to the U.S. Embassy in Turkey. Prosecutors claim that Saeed provided false information to federal officials when interviewed at the embassy and later on March 23 at the airport in Charlotte.

He had arrived in San Diego by March 31 when he was interviewed by an FBI agent once again.

He was arrested by FBI agents in San Diego’s Rancho Bernardo area on Tuesday, near Pomerado Road and Caminito de la Gallarda.

Two people who live in the neighborhood told NBC 7 Kodaimati was arrested at a condominium in the area where he and several others had been living for the past three months.

The arrest shocked residents, to say the least.

“I can't imagine my neighbor was arrested for that,” neighbor Bartosh Sudak said.

Sudak and other residents said the group, including women and children, began renting at the complex several months ago. Sudak doesn't personally know them and never had a suspicion about them.

“It's on the other side of the world. I can't imagine people here are dealing with that; I'm just baffled,” Sudak said.

In his first court appearance Thursday, Saeed wore jail fatigues and was shackled.

Prosecutors said Saeed lied about relationships with ISIS and the terrorist group Al Nusrah and fighting alongside them in Syria.

Once confronted with the Facebook pictures and messages, agents said Saeed changed his story.

“It was a fight alongside Al Nusrah, which is a foreign terrorist organization, and that he fired at people and he was fired upon,” said Assistant U.S. Attorney John Parmley.

Investigators said terrorist organizations use social media for recruiting. This time, it may be the very thing that gets them a conviction.

Saeed was ordered held without bail pending a hearing next week.