A Brentwood man who tried to travel to Yemen three years ago to join the terrorist group al-Qaida in the Arabian Peninsula was sentenced Monday to 25 years in federal prison.

An attorney for Marcos Alonso Zea, 26, argued that his client had not committed acts of violence or terrorism and never got to Yemen. Attorney Marc Bogatin of Manhattan said a 10-year term would be appropriate.

But Judge Sandra Feuerstein said in U.S. District Court in Central Islip that a lengthy prison term was necessary to deter Zea and any others who contemplated terrorism.

"I think a message has to be sent to others that this is absolutely not acceptable," the judge said in imposing the sentence, which was the maximum agreed to when Zea pleaded guilty in September.

He had faced up to life in prison if convicted after trial on the main charge of providing material support to a foreign terrorist organization.

As U.S. marshals led him into the courtroom, Zea smiled and waved to nine people, friends and relatives, in the audience. He turned around in his chair to face Assistant U.S. Attorney John Durham as the prosecutor urged the judge to impose the maximum sentence.

Durham said Zea had destroyed a hard drive on his computer to try to avoid prosecution, but investigators were able to retrieve information that showed he had read radical literature and given money to another Brentwood resident, Justin Kaliebe, to travel to Yemen.

advertisement | advertise on newsday

Zea tried to travel to Yemen in 2012, but was turned back by authorities in London when he could not explain why he wanted to enter Yemen and why he did not have a visa for Yemen, Durham said.

Kaliebe has pleaded guilty to a charge of attempting to provide material support to a foreign terrorist organization and awaits sentencing.

U.S. Attorney Loretta Lynch said in a statement after the court proceeding that Zea "presents a chilling reminder of the danger presented to the United States by homegrown terrorists. Born, raised and schooled in the United States, the defendant nonetheless betrayed his country."

Both Zea and Kaliebe attended the Masjid Darul Qur'an mosque in Bay Shore and knew each other there, the mosque's imam, Muhammed A. Jabbar, told Newsday previously. He has said neither man had given any indication of terrorist leanings.

Zea's parents, Sandra and Alvaro, said previously that their son was not capable of terrorism. His father said his son was raised a Roman Catholic but converted to Islam several years ago.