Hillary Rodham Clinton issued a hardline warning to Iran on Wednesday that as president she would "not hesitate" to take military action to stop the country from acquiring nuclear weapons. 

Casting herself as a key player in talks that led to the landmark agreement to control Iran's nuclear program, Clinton praised the accord as part of a larger Middle East strategy even as she stressed that it is not a step toward normalizing relations. 

"We should anticipate that Iran will test the next president," she told a Washington think-tank. "They'll want to see how far they can bend the rules." 

The Democratic presidential contender and former secretary of state said: "That won't work if I'm in the White House. I'll hold the line against Iranian noncompliance." 

Her remarks came as Congress prepared to open debate Wednesday on the deal. Democrats have clinched the votes needed to block passage of a disapproval resolution against the accord, a win for the White House against united Republican opposition. 

But much of the responsibility for enacting the agreement will fall on the next administration, making the issue likely to linger in the presidential campaign. The deal would require Iran to limit its nuclear program for at least a decade in exchange for billions of dollars in relief from international sanctions. 

Republicans are seizing on opposition to the deal among much of Congress and many American Jews to criticize Clinton, frequently casting the agreement as a plank of an "Obama-Clinton foreign policy." A new Pew survey released on Tuesday found that just 21 percent of Americans approved of the deal -- a 12 point drop since mid-July. 

In her remarks, Clinton attempted to reassure skeptics by threatening serious penalties for violations, including possible military action. She offered strong support for Israel, whose leaders strongly oppose the agreement, promising that if elected she would invite the country's prime minister to the White House during her first month in office. 

"The Iranians and the world need to understand that we will act decisively if we need to," she said. "As president, I will take whatever actions are necessary to protect the United States and its allies." 

But even as she offered a stern warning to Iran, she stressed that rejecting the deal would lead to international isolation for the U.S. 

"Several Republicans boast they'll tear up this agreement in 2017," she said. "That's not leadership, that's recklessness." 

Instead, she proposed measures to halt Iran's support for terrorist groups and other bad behavior in the region. 

Clinton called for expanding the U.S. military presence in the Persian Gulf and increasing support to Israel and other allies in the region. She also proposed building a coalition to crack down on weapons shipments to Hamas and to counter terrorist organizations financed by Iran, such as Hezbollah. 

Another goal: Press countries in the region to block ships and aircraft of Iran's elite military unit, the Islamic Revolutionary Guard Corps, from entering their territory. 

As secretary of state, Clinton helped facilitate the talks that eventually led to the nuclear deal. She sent a top adviser to participate in secret meetings with Iran through the sultan of Oman that started the international negotiations. 

Since then, she's largely backed the negotiations, staying current with the talks with regular briefings from administration officials, according to aides who spoke on the condition of anonymity because they weren't authorized to discuss private meetings publicly. 

Clinton's current support for the deal marks a striking role reversal for the second-time presidential candidate and her long-ago rival. In 2008, she called Barack Obama's offer to meet Iran's leader without preconditions "irresponsible and, frankly, naive." And when Clinton said she would "obliterate" Iran if the country used nuclear weapons against Israel, Obama likened her "bluster" to the "tough talk" of then-President George W. Bush. 

More recently, she's wondered publicly whether a deal would ever take shape. Clinton told an American Jewish organization last year that she was "skeptical the Iranians will follow through and deliver." She said she had "seen many false hopes dashed through the years."