You are not permitted to download, save or email this image. Visit image gallery to purchase the image.
"We did a whole lot of things that were right, but we tortured some folks. We did some things that were contrary to our values," Obama told a White House news conference.
Obama's comment was a reaffirmation of his decision to ban the use of interrogation techniques such as waterboarding shortly after he took office in January 2009.
The administration of President George W. Bush, Obama's predecessor, authorized the use of harsh questioning techniques of militant detainees in the wake of the 9/11 attacks after deciding they did not amount to torture.
Obama told reporters the techniques were used because the United States was afraid more attacks were imminent.
"It's important for us not to feel too sanctimonious in retrospect about the tough job that those folks had," he said. "A lot of those folks were working hard under enormous pressure and are real patriots."
Obama also said he had full confidence in CIA Director John Brennan despite a revelation the agency spied on a US Senate committee investigating its interrogation techniques.