MAYPORT NAVAL STATION, Fla. -- A Navy submarine sailor was sentenced Tuesday to two years in a military prison after he pleaded guilty to illegally making and trading videos of female officers undressing in the shower.

Charles Greaves, a missile technician, entered his plea and apologized to the four women officers, all of whom testified against him. He is one of seven charged in the case, but was the sole sailor charged with secretly making the videos.

Greaves and the female officers served aboard the USS Wyoming nuclear submarine based at Kings Bay Naval Submarine Base in Georgia. Navy prosecutors say Greaves made the videos and then boasted about trading them "like Pokemon" cards for energy drinks and other items with the other sailors.

"The accused has dehumanized these officers and made them objects, objects to be collected," Navy prosecuting attorney Lt. Cmdr. Lee Marsh said.

The case shines a light on issues the Navy has faced in integrating women into crews on ballistic-missile submarines, which it began to do in 2011.

The four female officers who were videotaped were among the first women to serve on Navy submarines in the Atlantic fleet. Marsh said Greaves' punishment -- reached in a plea deal in exchange for his admissions and testimony against other sailors -- needed to serve as a warning.

"We need to send a message ... that we value female service members," Marsh said. "Great women are here to stay. Get with the program or get out."

The women, some fighting through tears, testified that their careers had been ruined or derailed by the videos.

They all said they were drawn to submarine service because of the family-like atmosphere among the 150 sailors on the Ohio-class sub. The idea that some of these colleagues violated that family trust was devastating.

"I broke down," one of the women officers said, describing her reaction when she learned of the videos. "The people I was working next to, who I had immense faith and trust in ... were not anything that I thought they were."

She said that when she tried to return to her ship, she couldn't look her fellow sailors in the eye.

"I questioned people if they've seen the video, and I couldn't trust anyone that they hadn't," she said.

All four women said they have had a difficult time escaping the incident. One, who now teaches, said when people learn that she served on a submarine they often ask if it was the infamous vessel where women were videotaped.

Greaves said other sailors would serve as a lookout when the female officers were working out. When they finished, and went to the showers, the lookouts would tell Greaves so he could set his cellphone camera up in a crack between pipes that had a view of the submarine's shower area.

"This is a terrible thing to have done to anyone, especially fellow sailors," Greaves said, turning to look at the women in the courtroom gallery. "I shamed myself and derailed my ambitions."