President Obama, joined by British Prime Minister David Cameron, sharply warned Congress Friday not to pursue new sanctions on Iran -- saying they could derail the effort to strike a deal barring the country from getting a nuclear weapon.

Obama confirmed he has even warned congressional Democrats, some of whom support a new sanctions bill, that he would veto that legislation.

“Congress needs to show patience,” Obama said.

If new sanctions are approved while the Iran talks are ongoing, the president warned, “The likelihood of the entire negotiations collapsing is very high.”  

The comments amounted to the president’s most direct statements to date about how he would treat bipartisan Iran legislation being drafted on Capitol Hill. Obama noted that the current negotiations are operating under the understanding that no new sanctions would be brought against Iran.

Though the legislation may only tee up sanctions to go into effect if the talks fail, Obama said, “That is not how Iran would interpret it.”

Cameron, too, said he has been contacting U.S. senators to convey a similar view -- that Britain believes further sanctions could hurt the talks and “fracture international unity.”

“We should not impose further sanctions now,” Cameron said.

The president and Cameron spoke at a joint press conference, after they met at the White House.

Bipartisan legislation is in the works on Capitol Hill that would seek more sanctions on Iran. Additionally, lawmakers may seek a vote of their own on any nuclear deal that is made.

Tennessee GOP Sen. Bob Corker, chairman of the Senate Foreign Relations Committee, said Thursday at a Republican retreat that lawmakers would present legislation in a matter of weeks on Iran. Sens. Bob Menendez, D-N.J., and Mark Kirk, R-Ill., also are working on the legislation.

The New York Times reported that Menendez got into a sharp exchange with Obama at a Democratic summit on Thursday on the issue -- an account Democratic sources confirmed to Fox News. Sources said Menendez warned the president that if Congress waited – as Obama wants – sanctions could not be imposed quickly if the talks collapse.

But Obama claimed he would come to Congress, if talks fail, to “tighten the screws” against Iran. He said pursuing sanctions now could “undermine” international unity against the country. He suggested Iran would then be able to blame the U.S. for blowing up the deal, and other countries would see it that way as well.

Obama, meanwhile, conceded that the chances of a diplomatic deal are “probably less than 50-50.” 

House Majority Leader McCarthy, R-Calif., blasted Obama for his remarks later Friday. 

"Both the Obama Administration's concessionary approach to nuclear negotiations with Iran and its lack of an effective strategy to confront Iran's continuing aggression and support for terrorism throughout the region provide ample reason for concern," he said. "As I have said before, I believe the Administration has fundamentally misread the nature and strategy of the regime in Tehran. Securing an acceptable agreement with Iran will be difficult, if not impossible, unless decision makers in Tehran face additional pressure from the United States and international community." 

Corker also confirmed that he spoke with Cameron on the matter Friday, but said he still believes "Congress weighing in on this critical issue can help these negotiations succeed, not undermine them." 

Aside from Iran, fighting Islamic terrorism was a big part of the agenda for Obama and Cameron, who met at the White House a week after 17 people died in terror attacks in France spurred by a satirical newspaper's caricatures of the Prophet Muhammad.

"This is a problem that causes great heartache and tragedy and destruction," Obama said. "But it is one that ultimately we are going to defeat."

The prime minister was blistering in his assessment of those responsible for the attacks, calling them part of a "poisonous, fanatical, death cult."

Of this ideology, he said, “We will confront it wherever it appears.”

Fears of additional attacks by Islamic extremists grew Thursday, when police in Belgium killed two suspects during an anti-terror raid launched to pre-empt what officials called a major impending attack.

Amid the threats, the British leader has called for American technology companies like Google and Facebook to allow governments to snoop on encrypted communications. Cameron argues that intelligence agencies must be able to intercept terror suspects' communications on encrypted social media and messaging sites. However, his view has struck a nerve in the U.S. and in Britain, countries that both have grappled to find a balance between security and privacy.

Obama acknowledged Friday that laws governing wiretaps have to be updated, but said: “How to do that needs to be debated.”

While Cameron's trip to the U.S. was planned before the attacks in France, his visit is seen by the White House as an opportunity to show trans-Atlantic solidarity in the fight against terrorism.

"The terrorists know only how to destroy, but together we can do something infinitely more powerful: build security, strengthen justice and advance peace," Obama and Cameron wrote in The Times of London in an opinion piece in advance of Cameron's visit. "The United States and Britain will continue to work closely with all those who believe in peace and tolerance."

Ahead of the visit, Cameron announced that the U.S. and U.K. will stage cyber "war games" together and launch a joint "cybercell," where officials from the FBI and the National Security Agency will team up with Britain's GCHQ and MI5 intelligence and security agencies to share information on cyberthreats. The first round of war games, scheduled for later this year, will simulate an attack on banks and the financial sectors in London and New York, with more exercises to follow later to test the resilience of national infrastructure.

The Associated Press contributed to this report.