CIA Director John Brennan said Sunday that the battle against the Islamic State of Iraq and Syria (ISIS) will be "a long fight" that requires both a military and political solution.

"I don't see this being resolved anytime soon," Brennan said in an interview on CBS' "Face the Nation." "We need to turn back ISIS. We will turn back ISIS, I have no doubt about it, but I think there's going to be unfortunately a lot of bloodshed between now and then."

The militant group has made gains in recent weeks, capturing the cities of Ramadi in Iraq and Palmyra in Syria. Defense Secretary Ash Carter has been critical of the Iraqi troops that are fighting ISIS on the ground in Iraq, saying last week they lost Ramadi because they "just showed no will to fight."

Brennan disputed the idea that the U.S. intelligence community has been surprised by ISIS' strength, saying he reviewed the intelligence last week and that, "we saw a growing strength."

"There are a lot of factors that come to play in terms of what gains they're able to make on the ground and as has been discussed, sometimes there are different Iraqi units that either don't have the leadership, the logistic support that they need in order to counter ISIS. And therefore it's looked at as a lack of a will to fight. But I must say that there has been a fair amount of intelligence about the growing capabilities of ISIS as well as the challenges that beset the Iraqi government, the sectarian tensions that continue to fuel a lot of these problems," he said.

Brennan said that a long-term solution to ISIS' rise in the Middle East is going to require a political solution.

"I believe firmly that we're not going to resolve this problem on the battlefield. We have to keep the pressure on them but at the same time there has to be a viable political process that's able to bring together the actors inside Iraq and Syria and for them to be able to decide how they're going to have a peaceful future," he said.

The CIA director also weighed in on the fight over National Security Agency (NSA) surveillance. The agency's authority to collect phone metadata expires at the end of the day, but Sen. Rand Paul, R-Kentucky, has said he plans to "force the expiration" of the program.

"The tools that we had under the Patriot Act, those ways that we are able to monitor their activities, really have helped stop attacks. These tools are all part of a package of safeguards that have been put in place," Brennan said. "Unfortunately, I think that there has been a little too much political grandstanding and crusading for ideological causes that have skewed the debate on this issue. But these tools are important to American lives."

A reform bill called the USA Freedom Act, which has bipartisan support, would put an end to the government's bulk collection of phone records. However, it would still let the government access records from the phone companies, which would be obligated to hold onto those records.

If the program expires, Brennan warned that homeland security and intelligence officials will not be able to track terrorists who are trying to carry out attacks, though "we will be working as hard as we can to protect the American people."

"These are very important authorities that have not been abused by the government. These are authorities that have been used by the government to make sure that we're able to safeguard Americans," he said. "The sad irony is that most Americans expect the government to protect them. And so although there's a lot of debate that goes on, on the Congress and the Hill on this issue, I think, when you go out to Boise or Tampa or Louisville, Americans are expecting their law enforcement and homeland security and intelligence professionals to do their work."

He said that terrorist elements "have watched very carefully" what happens in the U.S., ranging from the release of classified information to changes in law and policies.

On the ongoing talks to limit Iran's nuclear program, Brennan said he is "confident" that the U.S. will be able to use its intelligence expertise to watch Iran's behavior and monitor whether or not they are abiding by their end of the agreement, in addition to inspectors from the International Atomic Energy Agency.

And with regards to the group of Taliban prisoners from Guantanamo Bay who were swapped for Army Sergeant Bowe Berghdal and will no longer be banned from traveling outside of Qatar, Brennan said there is an "ongoing process" of discussing what is best for U.S. security.

"They are Afghan citizens and we have been engaged with the Qatari government. I've talked personally to senior Qatari officials about their monitoring of these individuals that have been in Qatar for the last year. And looking what are the arrangements that could be put in place and what is going to be the disposition of these individuals, whether they will be sent back to Afghanistan or able to stay in Doha, so this is continuing," he said.