WASHINGTON (CNN) -- Images of detainee abuse at the hands of U.S. troops, which President Obama has barred from public view, so "infuriated" the nation's highest-ranking military officer he demanded leaders ensure continued training of troops to prevent abuse, according to a senior Pentagon official.

Adm. Mike Mullen said in a memo that mistreatment of detainees would have a lasting negative effect.

In a July 10 memo, Adm. Mike Mullen, chairman of the Joint Chiefs of Staff, wrote the service chiefs and the U.S. combatant commanders around the world that mistreatment of detainees would have a continued and lasting negative effect on the image of U.S. forces.

"Despite our best efforts, a misguided and misled few have managed to tarnish that reputation and breach the very trust we have worked so hard to earn. I am appalled by even the suggestion that someone in an American uniform would behave in such a way," he wrote in the memo. CNN obtained the memo, which was classified as "sensitive."

In May, President Obama ordered that the photos not be publicly released after commanders said the release could put deployed U.S. troops into harm's way by elements seeking retribution.

"We are better than what I saw in those pictures. We must prove it," Mullen said.

The memo was carefully written not to use the word "abuse" referring to what the photos showed, according to a Pentagon official.

Neither official would be identified because they were not authorized to speak on the record.

A senior official with direct knowledge of Mullen's intent for the memo said it was not to highlight the fact the photos exist, but rather highlight that U.S. troops were involved in such actions.

Don't Miss

"We haven't all absorbed or applied all the lessons of Abu Ghraib," he wrote, referring to the compilation of photos taken in the U.S.-run prison in Iraq, where detainees were exposed to physical abuse at the hands of U.S. troops.

Mullen saw the unreleased photos in May and June and discussed his reaction with senior military leaders during a June conference in Washington, according to a senior Pentagon official.

Mullen later decided to write the memo after thinking more about what he saw in the photos, the official said.

In the memo, Mullen asks the heads of all the branches of service to ensure proper training of troops as they enter the service. Mullen also asks commanders who oversee U.S. troops in various regions, or commands, around the world to ensure training of troops as they enter those regions.

"The message must be clear: the mistreatment of detainees in any way will not be tolerated under any circumstances. It is essential to who we are as a fighting force that we get this right," he wrote.