Hillary Clinton endorsed the Iran nuclear deal on Tuesday as “an important step in putting a lid on Iran’s nuclear program,” in statements that marked a sharp departure from the 2008 presidential campaign when she blasted Barack Obama’s stance on dealing with rogue powers like Tehran as "irresponsible" and "naïve."

House Democrats who met with Clinton on Capitol Hill, where she attended a series of meetings with lawmakers, described her as a strong backer of the controversial deal, with Virginia Rep. Gerry Connolly describing her endorsement as “full throated.”

In her public remarks, the former secretary of state’s backing was more qualified. She warned that the agreement, which curbs Iran’s nuclear program in exchange for billions of dollars in sanctions relief, would not end Iran’s “bad behavior” in the Middle East and said Tehran would still pose a serious threat to Israel.

“This agreement will have to be enforced vigorously, relentlessly,” Clinton said. “We have to treat this as an ongoing enforcement effort, which I certainly strongly support, and as president would be absolutely devoted to assuring the agreement is followed.”

But she backed the deal and praised Obama for his work in reaching it. “I applaud [President Obama] and both Secretary Kerry and Secretary Moniz for their extraordinary efforts in bringing about this conclusion,” Clinton said.

In a statement late Tuesday, Clinton again affirmed her support for the deal, saying, "I support this agreement because I believe it is the most effective path of all the alternatives available to the U.S. and our partners to prevent Iran from acquiring a nuclear weapon."

But in 2007, Clinton lambasted Obama for his diplomatic stance. When Obama said he would be prepared to meet without precondition with leaders of rogue nations, including Iran, in the first year of his presidency, Clinton told the Quad City Times: "I thought that was irresponsible and frankly naïve."

In 2008, Clinton used hawkish language when asked in an interview what she would do if Iran attacked Israel.

"I want the Iranians to know that if I'm the president, we will attack Iran," Clinton said. "In the next 10 years, during which they might foolishly consider launching an attack on Israel, we would be able to totally obliterate them."

The remarks drew fire from Obama, who said: "It's not the language we need right now, and I think it's language reflective of George Bush."

Clinton’s backing of the deal comes amid scathing criticism by Republican presidential candidates, such as GOP frontrunner Jeb Bush who called the deal “deeply flawed and short sighted.”

"The nuclear agreement announced by the Obama administration today is a dangerous, deeply flawed, and short sighted deal,” Bush said. “A comprehensive agreement should require Iran to verifiably abandon -- not simply delay -- its pursuit of a nuclear weapons capability."

South Carolina Sen. Lindsey Graham said the deal could be a “death sentence for the state of Israel,” while Wisconsin Gov. Scott Walker said it would be remembered as “one of America’s worst diplomatic failures.”

Meanwhile, Louisiana Gov. Bobby Jindal appealed directly to Clinton to oppose the deal.

“Secretary Clinton should be a voice of reason and oppose this deal,” Jindal said. “While Secretary Clinton has been the architect of President Obama’s foreign policy, she can do the right thing and prevent Iran from obtaining a nuclear weapon and oppose this deal.”

Other Democratic presidential hopefuls also backed the deal, with former Virginia Sen. Jim Webb calling it “an important moment” and Sen. Bernie Sanders, I-Vt., saying “the devil is in the details, but this is a significant step forward.”

The Associated Press contributed to this report.