A 22-year-old California man pleaded guilty Tuesday to trying to join Islamic extremists in Syria and could face up to 15 years in prison, federal prosecutors said.

Nicholas Teausant entered the plea to one count of attempting to provide material support or resources to a foreign terrorist organization, the U.S. Attorney's Office in Sacramento said.

Teausant was arrested in March 2014 in Washington state. He planned to travel to Canada and then on to Syria to join the Islamic State group and discussed his plans with a friend who was actually an FBI informant, authorities said.

"We hope that this case will be a reminder to us all to stay vigilant and involved in the lives of our youth, and in particular with respect to the dangerous influences they may be subject to on the Internet where these organizations are very active," Benjamin Wagner, U.S. attorney for the Eastern District of California, said in a statement.

Teausant's lawyers said he had a mental illness that made him vulnerable to the informant and had no real plans of joining the group. He had previously been found incompetent to stand trial but was ruled competent in August.

Prosecutors had previously raised the possibility of a plea deal, but they said Tuesday that Teausant's guilty plea was not part of any such agreement.

He is scheduled to be sentenced in March.