U.S. Defense Secretary Ashton Carter, while talking to American troops during an unannounced visit to Iraq on Thursday, cast doubt on whether Iran will abide by the terms of a nuclear agreement between Tehran and U.S.-led world powers.

Carter told a staff sergeant who asked how the deal will affect U.S. troops in Iraq:

I continue to be concerned about Iranian malign activity in the region to include here [in Iraq], and the possibility of Iranian aggression and the possibility that Iran will not obey the agreement, which we’ll find out, because there’s got to be inspections and [verification] and so forth.

He added, “We will keep the military option, which was the alternative to a deal.”

The nuclear accord “doesn’t solve all problems over in this part of the world, and it doesn’t solve all problems emanating from Iran. …It’s an agreement that places important limitations upon Iran, places no limits on us, and it doesn’t place any limits on anything we do with anybody in this region,” explained Carter.

Carter echoed critics of the nuclear deal who also think Iran may break the agreement. Iran has been accused of violating nuclear deals in the past. Critics believe it is unlikely that the Shiite powerhouse will change its ways under the agreement.

The Obama administration argues that the deal was not meant to function as a magic bullet that would solve all problems associated with Iran’s behavior. Rather, its goal is to prevent Iran from obtaining a nuclear weapon.

Carter told U.S. troops in Iraq, “The Iran nuclear deal, which is a good deal, in the sense that it will stop Iran from getting a nuclear weapon. It’s about Iranian nuclear weapons. It’s not about everything else Iran does.”

Repudiating the agreement based on the notion that it fails to reform Iran’s conduct “defies logic,” Obama told reporters after the deal was announced, adding that he was “not betting” on Iran changing its ways.

“It makes no sense; and it loses sight of what was our original No. 1 priority, which was making sure they don’t have a bomb,” he added.

Defense Secretary Carter has maintained that the military option remains on the table despite the agreement.