John Brennan sparred at length with Sen. Marco Rubio (R-Fla.) over whether the CIA should again operate terrorist detention centers, as it did during the early years of the George W. Bush administration.

Rubio expressed dismay over Tunisia's recent decision to release Ali Harzi, one of only two people arrested in connection with attacks on U.S. compounds in Beghazi, Libya, last September.

Rubio asked why  the U.S. intelligence community shouldn't have facilities for detaining and questioning terrorist suspects in such cases.

Brennan noted that the CIA has no legal authority to run detention centers, and he insisted that there already were plenty of options for dealing with captured terrorists, from criminal prosecutions to renditioning suspects to allied countries to conducting interrogations aboard U.S. naval vessels.

But he said it was important for the United States to work closely with foreign partners and "respect the rights" of foreign governments such as Tunisia to enforce their own laws.

"This country needs to make sure that we are setting an example for the rest of the world," Brennan said.