NEW YORK (CBSNewYork/AP) — A Tunisian man smiled and hugged his defense lawyer as a judge sentenced him Wednesday to the 15 months he had already served in prison in a terrorism case that fizzled after prosecutors distanced themselves from claims that he came to America to develop a network of terrorists.

Ahmed Abassi, 27, was sentenced in federal court in Manhattan by Judge Miriam Goldman Cedarbaum, WCBS 880’s Irene Cornell reported. He was held for deportation.

READ MORE: Harlem's Josephine Baker About To Be Given France's Highest Honor, A Resting Place In The Pantheon

“Mr. Abassi, I hope you will think very seriously about the events of the last year and will decide to always abide by the laws of the United States. And if you do that, I wish you good luck,” the judge told him.

“Thank you, your honor. I agree with you,” he said through an interpreter at a court proceeding that lasted about 10 minutes.

Abassi pleaded guilty last month to lying to a federal agent about why he came to the United States in 2013 and when he filled out a green card application. He could have faced up to six years in prison.

At the urging of an undercover FBI agent, Abassi in March 2013 flew to the United States, where he met frequently in a Manhattan apartment with another Tunisian citizen, Chiheb Esseghaier, and the agent.

Defense lawyer Sabrina Shroff said Abassi agreed to come to the United States only because the agent had promised to assist him in getting his visa renewed so he could return to Canada to live with his wife. Prosecutors say the visa was withdrawn by Canadian authorities while he was visiting family in Tunisia because he had become a target of an investigation into Esseghaier.

Esseghaier is awaiting trial in Toronto on charges he conspired with al Qaeda members in Iran in a plot to derail a train that runs between New York City and Montreal.

READ MORE: First Responders Pay Tribute To Sean Patrick Carroll, Volunteer Firefighter Killed In Thanksgiving Day House Fire

After Abassi was arrested, prosecutors initially claimed Abassi wanted to remain in the United States to cultivate a network of terrorists for international attacks, but the government eventually backtracked from its most inflammatory claims and dropped the most serious charges.

The government admitted Abassi had repeatedly refused an invitation to conspire to commit terrorism with Esseghaier, though it cited anti-American comments he made in discussions with the undercover agent and Esseghaier, including a claim that “America should be wiped off the face of the Earth.” Prosecutors added, though, that Abassi said he had no plan to attack the United States.

Outside court, Shroff said justice was long overdue.

“It was really sad to me that he spent 15 months in jail for doing nothing more than being stupid and opinionated,” she said.

Shroff said his opinions were “very much in contrast to anything he was ever willing to do.”

You Might Also Be Interested In:

[display-posts category=”news” wrapper=”ul” posts_per_page=”4″]

MORE NEWS: Attorney General's Office Releases Another Round Of Transcripts In Andrew Cuomo Investigation

(TM and © Copyright 2014 CBS Radio Inc. and its relevant subsidiaries. CBS RADIO and EYE Logo TM and Copyright 2014 CBS Broadcasting Inc. Used under license. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed. The Associated Press contributed to this report.)