The Marine Corps relieved two commanders this year partly due to their handling of the service's nude photo-sharing scandal, a top general said Tuesday.

The removal of the commanders, who were among the five relieved by the service, is proof the Marine Corps is taking action at the highest levels following revelations in March that troops were sharing nude photos and lewd comments about fellow service members online, said Gen. Glenn Walters, an assistant commandant and the head of a task force investigating the activity.

"You hear a lot out in the press that we don't hold people accountable. Yes, we do," Walters told reporters at the Pentagon.

Neither of the two commanders, who Walters would not identify, were involved in any of the photo-sharing or social media activity, he said.

The official reason for the removal was a loss of trust and confidence, Walters said.

"We have relieved commanders this year," Walters said. "Two out of those five who have been relieved I can directly attribute to an awareness of this issue and the fact that they did not have the correct command climate and what they did."

The Marine Corps and the Naval Criminal Investigative Service stood up a task force to investigate following a report by journalist Thomas Brennan that service members were using the Marines United Facebook page to post the photos, which included names, ranks, and duty stations of fellow troops without their knowledge.

The investigation expanded far beyond the Facebook page and has so far covered nearly 131,000 posted photos and 168 social media sites.

To date, one Marine has been sent to summary court martial and 32 others have received lesser, non-judicial or administrative punishments, according to the service.