WASHINGTON (AP) — The U.S. Senate muscled its way into President Barack Obama's talks to curb Iran's nuclear program, overwhelmingly backing legislation Thursday that would let Congress review and possibly reject any final deal with Tehran.

The vote was 98-1 for the bipartisan bill that would give Congress a say on what could be a historic accord that the United States and five other nations are trying to finalize with Iran. Under the agreement, Iran would roll back its nuclear program in exchange for relief from crippling economy penalties.

The lone "no" vote came from freshman Sen. Tom Cotton, a Republican who wants the administration to submit any agreement to the Senate as a treaty. Under the Constitution, that would require approval of two-thirds of the Senate.

The House is expected to vote next week on the measure.

The Republican leader of the House, Speaker John Boehner, said in a statement moments after the vote that the "goal is to stop a bad agreement that could pave the way to a nuclear-armed Iran, set off a regional nuclear arms race, and strengthen and legitimize the government of Iran."

White House spokesman Eric Shultz said Obama would sign the bill in its current form. But the spokesman added that Obama has made it clear that if amendments are added by the House "that would endanger a deal coming together that prevented Iran from obtaining a nuclear weapon, that we'd oppose it."

Even if Congress rejects his final nuclear deal with Tehran, however, Obama could use his executive pen to offer a hefty portion of sanctions relief on his own. He could take unilateral actions that — when coupled with European and U.N. sanctions relief — would allow a deal to be implemented.

The U.S. and other nations negotiating with Tehran have long suspected that Iran's nuclear program is secretly aimed at atomic weapons capability. Tehran insists the program is entirely devoted to civilian purposes.

The talks resume next week in Vienna, with a target date of June 30 for a final agreement.

Senate Majority Leader Mitch McConnell, a Republican, said the bill "offers the best chance for our constituents through the Congress they elect to weigh in on the White House negotiations with Iran."

Added Sen. Bob Corker, the Republican chairman of the Foreign Relations Committee: "No bill. No review."

The legislation would bar Obama from waiving congressional sanctions for at least 30 days while lawmakers examine any final deal. The bill would stipulate that if senators disapprove of the deal, Obama would lose his current power to waive certain economic penalties Congress has imposed on Iran.

The bill would require Congress to pass a resolution of disapproval to reject the deal, an action that Obama almost certainly would veto. Congress then would have to muster votes from two-thirds of each chamber to override the veto.

In the House, about 150 Democrats — enough to sustain a veto — wrote the president to express their strong support for the nuclear negotiations with Iran.

"We urge you to stay the course," the letter said. "We must allow our negotiating team the space and time necessary to build on the progress made in the political framework and turn it into a long-term, verifiable agreement."

The bill took a roller coaster ride to passage.

Obama first threatened to veto it. Then he said he would sign it if the measure was free of amendments the White House believed would make continued negotiations with Tehran virtually impossible.

It survived a blow from Israeli Prime Minister Benjamin Netanyahu, who stood before Congress in March and warned the U.S. that an emerging nuclear agreement would pave Iran's path to atomic weapons.

"It is a very bad deal. We are better off without it," he said in a speech arranged by Republicans. His address aggravated strained relations with Obama and gambled with the long-standing bipartisan congressional support for Israel.

The Senate Foreign Relations Committee passed a compromise bill on a 19-0 vote. Obama withdrew his veto threat.

But Republicans were not done trying to change the bill, drawing up more than 60 amendments.

McConnell did not want to see the bill end in tatters, so he acted to end the amendment process and have votes on the legislation.

.