A Navy officer will spend a year behind bars and get kicked out of the service after he was found guilty last month at a court-martial trial, according to Navy records.

Lt. Cmdr. Robert J. Cleary was found guilty by a military jury on Sept. 13 following a four-day trial. He had faced charges involving child pornography and workplace masturbation.

In addition to a year in the brig and dismissal, the result of trial records indicate he also must register as a sex offender.

Cleary’s military attorney did not respond to requests for comment submitted through Navy Region Southwest spokesman Kevin Dixon.

The California native was convicted on charges of possessing, receiving or viewing child pornography, attempted possession of child pornography, conduct unbecoming an officer and violation of a lawful general order, according to the trial results record.

He was found not guilty of one count of conduct unbecoming and for failing to obey a lawful written order.

Dixon did not confirm where Cleary would serve his time by Navy Times’ deadline.

A meteorology and oceanography officer assigned to Navy Surface and Mine Warfighting Development Center’s Point Loma detachment in California, Cleary was charged earlier this year with attempting to possess, receive and view child pornography on his work computer from May 2016 to April 2017.

During that time, Cleary masturbated at his desk on several occasions, “which conduct was unbecoming an officer and gentlemen,” prosecutors alleged in charge sheets.

Prosecutors also charged him with possessing child pornography after images were found on a laptop in July 2017.

Cleary reported to the development center in 2014 after a stint on board the aircraft carrier Ronald Reagan, according to service records.

He enlisted in 1991 and served on board the fast attack submarine Indianapolis for about six years.

He was commissioned in 2002 after five years on inactive reserve status.