A former Navy sailor convicted of leaking details about ship movements and the best ways to attack them was sentenced Friday to the maximum 10 years in prison.

U.S. District Judge Mark Kravitz said Hassan Abu-Jihaad, of Phoenix, betrayed his country and endangered his fellow sailors.

"I cannot really overstate the seriousness of this crime," Kravitz said.

The leak "does constitute a fundamental betrayal of your country and of your oath. You endangered your colleagues, you endangered your vessel and other vessels and other sailors, and you endangered your country."

Abu-Jihaad was convicted last year of disclosing classified national defense information.

Prosecutors labeled him a traitor who was trying to help foreign terrorists replicate the bombing of the USS Cole, which killed 17 American sailors.

Abu-Jihaad did not speak during the hearing. His attorney, Dan LaBelle, said his client maintained his innocence and appreciated the fairness of the court.

He said his client's demeanor in court has been "very remarkable."

Prosecutor William Nardani encouraged Kravitz to consider Abu-Jihaad's actions, not his demeanor in court. He said the former sailor praised the Cole bombing as an operation carried out by martyrs.

"That is a twisted view of the world," Nardani said.

Kravitz said Abu-Jihaad's sentence should be a deterrent for anyone who supports terrorism.

"We happen to be engaged in a very different struggle right now," Kravitz said. "It's really a struggle about the fundamentals of freedom. ... we need to ensure the people that are part of that struggle on our end ... protect classified information from getting into the hands of those who stand opposed to those concepts of freedom."

Abu-Jihaad was also convicted on a charge of providing material support to terrorists, but Kravitz overturned the conviction last month, citing the language of the law.