BOSTON — An American citizen from an upscale suburb here was convicted on Tuesday of conspiring to support Al Qaeda and of other terrorism charges.

Federal prosecutors told the jury that Tarek Mehanna, 29, of Sudbury, traveled to Yemen in 2004 to train as a terrorist with the goal of attacking American soldiers in Iraq. Mr. Mehanna, a graduate of the Massachusetts College of Pharmacy and Health Sciences, failed to get the training, but then returned home and conspired to help Al Qaeda by promoting violent jihad on the Internet, prosecutors said.

The jury deliberated for about 10 hours, after hearing 31 days of testimony. It found Mr. Mehanna guilty on all charges, including conspiring to kill in a foreign country and lying to investigators, as well as conspiring to support terrorists. In the decade since the Sept. 11 attacks, the government has won many such convictions using a federal law that makes it a crime to provide “material support” to foreign terrorist groups.

Mr. Mehanna’s lawyer, J. W. Carney Jr., said he would appeal.

“The charges scare people,” he told reporters after the verdict was announced. “The charges scared us when we first saw them. But the more that we looked at the evidence, the more that we got to know our client Tarek, the more we believed in his innocence.”