Hillary Clinton addreses the Brookings Institution Saban Forum on Sunday in Washington. (James Lawler Duggan/Reuters)

Iran is sure to violate the international nuclear pact it signed this year, and the United States must be firm and swift in cracking down on any cheating, Democratic presidential candidate Hillary Clinton said Sunday.

“I have every reason to believe the Iranians are going to test it. They are going to violate it, they are going to be provocative about it, and we need to respond quickly and very harshly,” Clinton said. “And if we have any evidence that they are back into moving toward a nuclear weapon, then we will have to act even more directly.”

Clinton also said the Islamic State is seeking to spread its influence across the Middle East, including at Israel’s doorstep. She warned that the militants might seek to displace the moderate Palestinian leadership in the West Bank.

“The alternative to Abbas could be the black flag of the Islamic State,” she said, referring to Palestinian Authority President Mahmoud Abbas, whose commitment to peace is widely questioned in Israel.

Clinton said she would work for an independent Palestinian state as president, “along with steps short of a final agreement” that could improve Israeli security along with economic and other conditions for the Palestinians.

Speaking in Washington to the annual Brookings Institution Saban Forum on U.S.-Israeli relations, Clinton acknowledged recent bad blood between the Obama administration and Israeli Prime Minister Benjamin Netanyahu and suggested she would try to start fresh. She renewed a pledge to invite the Israeli leader to Washington on her first day in office.

Netanyahu bitterly opposed the Iran deal that President Obama and other world leaders brokered and tried unsuccessfully to derail it.

Netanyahu has also said Iran is sure to cheat and suggested that Obama was too eager to cut a deal. Netanyahu addressed the same forum earlier Sunday.

Several of Clinton’s Republican presidential campaign opponents have said they share Netanyahu’s view and would undo the deal if elected next year.

Clinton backs the deal, but she sounded every bit as skeptical as some of her most hawkish 2016 opponents.

“They are going to test. It’s just their nature,” Clinton said of the Iranians. “They are going to test us, and we have to stop them and demonstrate to them that we intend to hold them to that agreement.”

Warning repeatedly that the United States must tolerate no bending of the rules and be ready to reapply sanctions, Clinton had an implicit warning for Obama.

“How we handle enforcement in these early months will set the tone for years to come,” Clinton said. “We have to get it right. Our message to Iran must be unequivocal. There will be consequences for even small violations.”

As secretary of state during Obama’s first term, Clinton helped inaugurate the secret talks that led to the deal concluded after she left office.

Obama will be responsible for the initial enforcement of the deal that is his signature foreign-policy accomplishment, but much of the harder monitoring and difficult decisions about sanctions will come after a new president takes office.

“Is it perfect? No. No agreement like that ever is. But I believe that if it is aggressively implemented and enforced, this deal will help us prevent a nuclear-armed Iran,” Clinton said.