A pharmacy graduate from Massachusetts who sympathized with al-Qaeda, and traveled to Yemen in the hopes of linking up with the terrorist group, was sentenced Thursday to 17½ years in federal prison, court officials said.

Tarek Mehanna, 29, was found guilty in December of conspiring to help al Qaeda, conspiring to commit murder in a foreign country and making false statements.

"This is one of the most significant terror-related cases ever brought," said Boston College law professor George Brown. "Prosecutions like this push the envelope in terms of how far the government can go after an individual's conduct prior to committing any terrorist act.

"The government was a big winner today."

Mehanna traveled to Yemen in 2004 to receive training to kill American soldiers and support terrorism at home. But he never found a training camp, and it remains unclear if he ever made contact with a terrorist group.

After returning to the United States, Mehanna posted al Qaeda recruitment videos and documents on the Internet, and was convicted of providing material support to terrorists Though it's again not clear if he ever actually made contact with the group.

Prosecutors say Mehanna had been in touch with a man named Daniel Joseph Maldonado, who headed to the Horn of Africa to receive jihadist training. Maldonado pleaded guilty in 2007 to traveling to Somalia to fight in a "jihad" against the transitional government there.

"I think the judge wanted to be cautious and distinguish this kind of conduct from the more fundamental (and traditional descriptions of) terrorist acts," Brown said.

Federal prosecutors had asked for 25 years, and Mehanna could have faced life in prison.

The case has been a focus of legal experts, who debated the extent of free speech protection and how and when authorities can move against someone believed to be engaged pre-terror-related activity.

Mehanna's lawyers had argued that in collecting and distributing jihadist propaganda upon his return to the U.S., he was exercising his First Amendment rights. Some of the material he translated, they say, involved mujahedeen fighting the Soviet occupation of Afghanistan more than two decades ago.

But prosecutors instead argued that law enforcement has the responsibility to both head off and deter potential terrorist threats.

"There is a greater value in using this case to achieve the ends of general deterrence than in terrorism cases involving isolated or short-lived activities," they said in a statement. "That is because Mehanna's actions are the kind that most individuals who are radicalized in America are likely to contemplate replicating -- traveling overseas to get terrorism experience, and using the Internet to connect with and support other terrorists."

Mehanna's supporters, meanwhile, have pledged their backing online, setting up a website in his defense.

U.S. District Judge George A. O'Toole also handed Mehanna seven years of supervised release as a part of the closely watched decision Thursday.

Hailing from a Boston suburb, Mehanna earned a doctorate at the Massachusetts College of Pharmacy and Health Sciences, where his father worked as a professor.