LOS ANGELES — A California man who told an undercover FBI agent that he was committed to waging jihad and planned to travel to Pakistan to train al-Qaida fighters was sentenced Monday to 13 years in federal prison.

Sinh Vinh Ngo Nguyen, 25, of Garden Grove pleaded guilty in December to attempting to provide material support to a designated foreign terrorist organization. He had faced a maximum possible sentence of 15 years in prison.

“I simply do not understand how we can rehabilitate his commitment to die for his beliefs,” U.S. District Court Judge John F. Walter said while discussing what potential threat Nguyen might pose after his release.

In a plea agreement filed in federal court, Nguyen acknowledged meeting someone he believed to be an al-Qaida recruiter several times between August and October 2013.

The recruiter was actually an undercover FBI agent. Nguyen agreed to travel to Pakistan via Mexico to train 30 al-Qaida fighters for an ambush on coalition soldiers, authorities said. Walter said he was confident that Nguyen would have carried out the “deadly mission” if the recruiter had been with al-Qaida.