NORFOLK, Va. (WVEC) -- A sailor was sentenced to 21 months of confinement by a military judge after pleading guilty to recording or attempting to recording women while he was serving aboard the USS Theodore Roosevelt.

The Virginian-Pilot reports that 22-year-old Petty Officer 2nd class Bryce Mezney attempted to record five junior officers and a civilian employee during the Roosevelt's 2015 deployment by holding up his phone to a grate in their stateroom doors. He was caught when a seventh woman, an officer, saw him using a phone to record her while she was changing.

Mezney will serve 12 months of his 21-month sentence under a presentencing agreement. In addition, his rank has been reduced to seaman and he has been given a dishonorable discharge.