Washington (CNN) One of President Barack Obama's defense secretaries warned that the Iranian regime could ratchet up its attacks and nuclear ambitions now that the US has abandoned the Iran nuclear deal.

"I worry that the Iranians in the near term are going to start once again doing things," Ash Carter told CNN's "New Day" co-anchor Chris Cuomo on Friday. "They have conducted attacks on the United States, harassing, using proxies to attack Americans."

He added, "So they may start doing things that they wouldn't have done. And we need to protect ourselves."

Carter, who served two years as the Pentagon's top official, said he would not have advised pulling out of the Iran nuclear deal, a move President Donald Trump announced Tuesday

"It did not take off the table all of Iran's many malign activities in the region," Carter said of the international agreement reached in 2015. "It did take off the table in a verifiable way the near-term prospect of them getting a nuclear weapon. From a defense point of view, that was important."

Read More