President Obama expressed confidence in Director of National Intelligence James Clapper but said the spy chief should have been “more careful” in his testimony before Congress.

“I think that Jim Clapper himself would acknowledge, and has acknowledged, that he should have been more careful about how he responded,” said Obama in an interview with CNN’s Jake Tapper, which aired on Friday.

Clapper is facing heat from Congress, with many lawmakers accusing him of lying in a hearing about the National Security Agency's surveillance programs.

When asked by Sen. Ron Wyden, D-Ore., if the agency was collecting data on Americans at a 2012 hearing, Clapper responded “No sir … not wittingly.”

Leaks from former government contractor Edward Snowden revealed the NSA's secret surveillance, which includes the monitoring and collection of phone call metadata.

Some lawmakers have called for Clapper to be fired. The intelligence chief has admitted his answer was incorrect, but has denied that he intentionally tried to mislead Congress, saying only that he misspoke.

“His concern was that he had a classified program that he couldn't talk about and he was in an open hearing in which he was asked, he was prompted to disclose a program and so he felt that he was caught between a rock and a hard place,” said Obama in the interview, defending Clapper.

“Subsequently, I think he's acknowledged that he could have handled it better. He's spoken to Mr. Wyden,” Obama added.

The president has defended the NSA surveillance practices but also instituted new reforms he said would better protect privacy rights — while leaving the controversial programs in place.

Obama defended the work of the intelligence community.

“Everybody that I've dealt with in our intelligence community is really working hard to try to do a very tough job to protect us, when there are constant threat streams coming at us, but doing so in a way that's consistent with the law and is consistent with our constitution and consistent with our privacy rights,” he said.