WASHINGTON (AP) -- President Barack Obama secured a landmark foreign policy victory Wednesday as Senate Democrats amassed enough votes to ensure the Iran nuclear deal survives in Congress, despite ferocious opposition from Republicans and the government of Israel.

Democratic Sen. Barbara Mikulski of Maryland became the crucial 34th vote in favor of the agreement.

"No deal is perfect, especially one negotiated with the Iranian regime," Mikulski said in a statement. She called the accord "the best option available to block Iran from having a nuclear bomb. For these reasons, I will vote in favor of this deal."



Photos from the US-Iran nuclear talks and aftermath:



18 PHOTOS John Kerry and Iran nuclear talks See Gallery Obama gets Iran deal win as Senate Dems amass enough votes US Secretary of State John Kerry organizes his papers during a hearing of the Senate Foreign Relations Committee on Capitol Hill July 23, 2015 in Washington, DC. US Secretary of State John Kerry, US Secretary of Energy Ernest Moniz and US Secretary of the Treasury Jacob Lew appeared before the committee to defend the Obama administrations proposed deal with Iran over the county's nuclear program. AFP PHOTO/BRENDAN SMIALOWSKI (Photo credit should read BRENDAN SMIALOWSKI/AFP/Getty Images) US Secretary of State John Kerry (L) sits next to British Foreign Secretary Philip Hammond as they attend a plenary session at the United Nations building in Vienna, Austria July 14, 2015. Iran and six major world powers reached a nuclear deal on Tuesday, capping more than a decade of on-off negotiations with an agreement that could potentially transform the Middle East, and which Israel called an 'historic surrender'. AFP PHOTO / POOL / CARLOS BARRIA (Photo credit should read CARLOS BARRIA/AFP/Getty Images) Israeli Prime Minister Benjamin Netanyahu delivers a statement in his office in Jerusalem on July 14, 2015, after world powers reached a historic nuclear deal with Iran. Netanyahu said after the deal was reached that Israel was not bound by it and signalled he remained ready to order military action . AFP PHOTO / THOMAS COEX (Photo credit should read THOMAS COEX/AFP/Getty Images) (From L to R) Chinese Foreign Minister Wang Yi, French Foreign Minister Laurent Fabius, German Foreign Minister Frank-Walter Steinmeier, European Union High Representative for Foreign Affairs and Security Policy Federica Mogherini, Iranian Foreign Minister Mohammad Javad Zarif, Head of the Iranian Atomic Energy Organization Ali Akbar Salehi, Russian Foreign Minister Sergey Lavrov, British Foreign Secretary Philip Hammond, US Secretary of State John Kerry and US Secretary of Energy Ernest Moniz pose for a group picture at the United Nations building in Vienna, Austria July 14, 2015. Iran and six major world powers reached a nuclear deal, capping more than a decade of on-off negotiations with an agreement that could potentially transform the Middle East, and which Israel called an 'historic surrender'. AFP PHOTO / POOL / JOE KLAMAR (Photo credit should read JOE KLAMAR/AFP/Getty Images) German Minister for Foreign Affairs Frank-Walter Steinmeier (L) ,French Foreign Minister Laurent Fabius (3rd L), China's Foreign Minister Wang Yi (5th L), Federica Mogherini (C), High Representative of the European Union for Foreign Affairs and Security Policy, US Secretary of State John Kerry (3rd R), British Foreign Secretary Philip Hammond (2nd R) and Russian Foreign Minister Sergey Lavrov (R) sit around the table at the Palais Coburg Hotel where the Iran nuclear talks meetings are being held in Vienna, Austria on July 6, 2015. Foreign ministers from major powers began crunch talks in Vienna on Monday seeking to seal a historic nuclear deal to end a 13-year standoff, one day before a final deadline, officials said. AFP PHOTO / JOE KLAMAR (Photo credit should read JOE KLAMAR/AFP/Getty Images) German Foreign Minister Frank-Walter Steinmeier (L), French Foreign Minister Laurent Fabius (3rd L) and Chinese Foreign Minister Wang Yi (R) sit around the table at the Palais Coburg Hotel where the Iran nuclear talks meetings are being held in Vienna, Austria on July 6, 2015. Foreign ministers from major powers began crunch talks in Vienna on Monday seeking to seal a historic nuclear deal to end a 13-year standoff, one day before a final deadline, officials said. AFP PHOTO / POOL / CARLOS BARRIA (Photo credit should read CARLOS BARRIA/AFP/Getty Images) US Secretary of State John Kerry walks delivers a statement on Cuba outside the hotel where the Iran nuclear talks meetings are being held in Vienna, Austria, July 1, 2015. Talks between Iran and major powers towards a historic nuclear deal are facing tough issues but are making progress, US Secretary of State John Kerry said during a break from talks in Vienna. AFP PHOTO / CHRISTIAN BRUNA (Photo credit should read CHRISTIAN BRUNA/AFP/Getty Images) US President Barack Obama gestures while making a statement at the White House in Washington, DC, on April 2, 2015 after a deal was reached on Iran's nuclear program. Iran and world powers agreed on the framework of a potentially historic deal aimed at curbing Tehran's nuclear drive after marathon talks in Switzerland. AFP PHOTO/ NICHOLAS KAMM (Photo credit should read NICHOLAS KAMM/AFP/Getty Images) UNITED STATES - APRIL 14: Sen. Bob Corker, Senate Foreign Relations chairman, arrives for a briefing on Iran nuclear negotiations with Secretary of State John Kerry and President Obama's chief of staff Jack Lew in the Capitol on Tuesday, April 14, 2015. (Photo By Bill Clark/CQ Roll Call) French Foreign Affairs Minister Laurent Fabius (R) listens on as US Secretary of State John Kerry speaks during a joint press conference on March 7, 2015 at the Foreign Affairs Minister in Paris. Kerry had flown into Paris just a couple of hours earlier in a bid to shore up European support for the proposed deal with Iran ahead of a March 31 deadline. AFP PHOTO /ERIC FEFERBERG (Photo credit should read ERIC FEFERBERG/AFP/Getty Images) EU political director Helga Schmid (CL) seats next to Iran's deputy foreign minister Abbas Araqchi (R) at the opening of nuclear talks between Iran and Members of the P5+1 group on March 5, 2015 in Montreux. The so-called P5+1 group of Britain, China, France, Russia, the United States and Germany is trying to strike an accord that would prevent Tehran from developing a nuclear bomb. AFP PHOTO / FABRICE COFFRINI (Photo credit should read FABRICE COFFRINI/AFP/Getty Images) WASHINGTON, DC - MARCH 03: Israeli Prime Minister Benjamin Netanyahu (3rd L) talks to U.S. Senate Majority Leader Sen. Mitch McConnell (R-KY) and Senate Majority Whip Sen. John Cornyn (R-TX) (L) as Senate Minority Leader Sen. Harry Reid (D-NV) (R) looks on during a photo-op prior to a meeting at the U.S. Capitol March 3, 2015 in Washington, DC. At the risk of further straining the relationship between Israel and the Obama Administration, Netanyahu addressed a joint meeting of the U.S. Congress warning congressional members against what he considers an ill-advised nuclear deal with Iran. (Photo by Alex Wong/Getty Images) US Secretary of State John Kerry (R) is greeted by French Foreign Minister Fabius Laurent, on March 7, 2015, at the French Foreign Ministry in Paris. Flying in from London on the last stop of a week-long trip, Kerry will meet with the foreign ministers of France, Germany, and Britain to brief them on the status of the nuclear negotiations with Iran. AFP PHOTO/ERIC FEFERBERG (Photo credit should read ERIC FEFERBERG/AFP/Getty Images) LAUSANNE, SWITZERLAND - MARCH 28: German Foreign Minister Frank-Walter Steinmeier arrives at Beau-Rivage Palace in Lausanne, Switzerland where he came for the nuclear talks with Iran on March 28, 2015. (Photo by Fatih Erel/Anadolu Agency/Getty Images) LAUSANNE, SWITZERLAND - MARCH 28: German Foreign Minister Frank-Walter Steinmeier arrives at Beau-Rivage Palace in Lausanne, Switzerland where he came for the nuclear talks with Iran on March 28, 2015. (Photo by Fatih Erel/Anadolu Agency/Getty Images) US Under Secretary for Political Affairs Wendy Sherman (L) and US Secretary of State John Kerry (2nd L) face French Director-General for Political and Security Affairs at the Ministry of Foreign Affairs, Nicolas de Riviere (2nd R), and French Foreign Minister Laurent Fabius (R) at the opening of a bilateral meetinh at Iran nuclear talks on March 28, 2015 in Lausanne. AFP PHOTO / FABRICE COFFRINI (Photo credit should read FABRICE COFFRINI/AFP/Getty Images) The director-general for political and security affairs at the French Foreign Ministry, Nicolas de Riviere (2nd R), and French Foreign Minister Laurent Fabius (R) wait look on March 28, 2015 before a meeting at the Beau Rivage Palace Hotel March 28, 2015 in Lausanne. US Secretary of State John Kerry and Fabius met while in Switzerland for negotiations with Iran on its nuclear program.. AFP PHOTO / FABRICE COFFRINI (Photo credit should read FABRICE COFFRINI/AFP/Getty Images) Iranian Foreign Minister Javad Zarif (C) takes a walk before meetings at the Beau Rivage Palace Hotel March 28, 2015 in Lausanne. Iranian officials are in Switzerland to continue negotiations on their nuclear program with other world powers. AFP PHOTO / POOL / BRENDAN SMIALOWSKI (Photo credit should read BRENDAN SMIALOWSKI/AFP/Getty Images) Up Next See Gallery Discover More Like This HIDE CAPTION SHOW CAPTION of SEE ALL BACK TO SLIDE

The backing from Mikulski, who is retiring next year, gives supporters the margin they need to uphold an Obama veto of a congressional resolution of disapproval if Republicans pass such a measure later this month.

And it spells failure for opponents of the international agreement who sought to foil it by turning Congress against it. Leading that effort were Israel and its allies in the U.S., who failed to get traction after spending millions of dollars trying.

The agreement signed by Iran, the U.S. and five other world powers limits Iran's nuclear program in exchange for hundreds of billions of dollars in relief from international sanctions. Republicans and Israeli officials contend that concessions made to Iran could enable the country to wreak havoc throughout the Middle East.

Prime Minister Benjamin Netanyahu, who had personally lobbied U.S. lawmakers to block the nuclear pact, will continue fighting the agreement, an Israeli official said.

Marshall Wittmann, spokesman for the pro-Israel lobby AIPAC, said his group also would continue rallying opposition to the nuclear agreement.

In a letter delivered to Congress Wednesday, Secretary of State John Kerry called Israel's security "sacrosanct," recounting the billions of dollars the U.S. has provided the Jewish state for missile defense and other security assistance. U.S. and Israeli officials, he said, are working on a deal to "cement for the next decade our unprecedented levels of military assistance."

The letter was sent as Kerry defended the Iran deal in Philadelphia. His speech was carried live in Iran, an unusual occurrence.

"Rejecting this agreement would not be sending a signal of resolve to Iran, it would be broadcasting a message so puzzling that most people across the globe would find it impossible to comprehend," Kerry told lawmakers and civil leaders at the National Constitution Center.

"It's hard to conceive of a quicker or more self-destructive blow to our nation's credibility and leadership - not only with respect to this one issue, but across the board, economically, politically, militarily, even morally. We would pay an immeasurable price for this unilateral reversal," Kerry argued.

He said the Obama administration would ensure that America's Arab allies, like Israel, would have the "political and military support they need" to protect themselves from the threat posed by Iran.

With opposition to the agreement failing to take hold on the Democratic side, supporters may be able to muster the 41 votes needed to block the disapproval resolution from passing in the first place, sparing Obama from having to use his veto pen. That would require seven of the 10 remaining undeclared senators to decide in favor of the deal.

Only two Democratic senators have come out against - Chuck Schumer of New York and Robert Menendez of New Jersey. And in recent weeks undeclared Democratic senators, even from Republican-leaning states, have broken in favor one after another.

Even if Congress passes the disapproval resolution, it can't stop the deal reached by Iran, the United States, Britain, France, Germany, Russia and China. It might help congressionally mandated sanctions remain in place. But the U.N. Security Council endorsed the nuclear deal unanimously in July and outlined how it would lift international sanctions on Iran.

Watch Kerry's interview on MSNBC:



Senate Majority Leader Mitch McConnell, R-Ky., acknowledged Obama "may be able to sustain a veto with the tepid, restricted and partisan support." But he said the Senate would move ahead next week with a "serious" debate and that Congress' bipartisan support would be needed to "strengthen our defenses in the Persian Gulf and to stand up to the inevitable Iranian violations of the agreement."

Sen. Marco Rubio, a Republican presidential candidate, vowed to re-impose all sanctions on Iran on Day 1 if he becomes commander-in-chief. "Then I will go to Congress and ask them to even increase those sanctions more, and I will back that up with a credible threat of military force," he said.

---

Lee reported from Philadelphia. Josef Federman contributed to this story from Jerusalem.



More from AOL.com:

Rocket with 'Denmark's Gagarin' lifts off to space station

Obama visits Arctic community to discuss Native issues

NYC council speaker endorses Hillary Clinton for president