Sen. John McCain said Sunday his support for immigration changes hurt his presidential candidacy because people were not convinced that it would secure the border.

"The immigration issue has caused me some difficulties with our base," the Arizona Republican said.

The failed immigration bill supported by McCain included border security measures and a guest worker program and would have legalized many of the estimated 12 million illegal immigrants living in the U.S.

McCain has since endorsed a plan that would tighten the borders, but not include a guest worker provision.

But he said his campaign, which has been weakened by multiple resignations and poor fundraising, is regaining its footing.

"We are back on town hall meetings, and enthusiasm is there. And we're going to be just fine in my campaign," he said. "Every campaign has its ups and downs."

He said it is critical to convince the public that the borders can be controlled by setting up a system that would provide a tamperproof document about an immigrant's legal status.

"And anybody who doesn't have that, then the employer who hired them would be prosecuted," he said.

McCain said his campaign should recover strength because he is the most qualified of all the candidates in either party to take on radical Islamic extremism.

McCain spoke on "Face the Nation" on CBS.