A US Navy lawyer faces six months in prison and dismissal from service for sending a human rights lawyer the names of 550 Guantanamo Bay detainees.
Hundreds of men are held without charge at Guantanamo Bay
Lt Cdr Matthew Diaz, 41, posted a list of the names in an unmarked Valentine's Day card during the final days of his service at Guantanamo Bay in 2005.
He apologised during his sentencing for having acted "irrationally".
The US military had originally refused to release the names of the men it was holding at Guantanamo Bay.
The names were made public in 2006 after the Associated Press news agency won a court case against the military.
At a court martial, Lt Cdr Diaz was convicted of communicating secrets that could be used to harm the US and of three other charges of passing on information to an unauthorised person.
The jury recommended that Lt Cdr Diaz receive full pay and benefits during his time in jail.
The sentence and the dismissal order are reportedly subject to further approval and to review by an appeals court.
Lt Cdr Diaz apologised for his actions during his sentencing.
"I should have done better. It was extremely irrational for me to do what I did," he said.
However, in an earlier interview with US paper, The Dallas Morning News daily, he appeared to defend his actions.
"I had observed the stonewalling, the obstacles we continued to place in the way of the attorneys," the paper quoted Lt Cdr Diaz as saying.
"I knew my time was limited... I had to do something."
The officer said he had been moved to act because prisoners' rights under the Geneva Convention had been violated.
"No matter how the conflict was identified, we were to treat them in accordance with Geneva, and it just wasn't being done."
The US government says the men held at its military prison in Guantanamo Bay pose a grave threat to the country and have not been tortured.
The Dallas Morning News quotes Lt Cdr Diaz questioning both these assertions.
The sentencing of Lt Cdr Diaz has been criticised by the Centre for Constitutional Rights, the New York-based human rights body whose lawyer received the Valentine's Day card and the list of suspects.
"We believe that Lt Cmdr Diaz's actions were grounded in a strong sense of morality and commitment to the rule of law," a statement on the centre's website said.