WASHINGTON (AP) -- In a speech that stirred political controversy in two countries, Israeli Prime Minister Benjamin Netanyahu told Congress on Tuesday that negotiations underway between Iran and the United States would "all but guarantee" that Tehran would get nuclear weapons, a step he said the world must avoid at all costs.

"Iran has proven time and again that it cannot be trusted," no matter what it says about permitting verification of the terms of any accord designed to prevent it from getting such weapons, he said.

"The greatest danger facing our world is the marriage of militant Islam with nuclear weapons," he said in remarks before a packed House chamber.

Netanyahu spoke shortly after Secretary of State John Kerry met for more than two hours in Switzerland with Iranian Foreign Minister Mohammad Javad Zarif in hopes of completing an international framework agreement later this month to curb Tehran's nuclear ambitions.

The Israeli leader's appeal also came two weeks before tight elections in which he is seeking a new term - and after the invitation to address Congress extended by House Speaker John Boehner, a Republican, triggered a political furor in the United States. More than four dozen House and Senate Democrats said in advance they would not attend the event, a highly unusual move given historically close ties between the two allies.

Many of Netanyahu's comments were greeted by loud applause from U.S. lawmakers, and not just Republicans. But not everyone was persuaded by his rhetoric.

House Democratic Leader Nancy Pelosi of California conspicuously refrained from applauding on several occasions. And when the Israeli leader called for holding out for a better deal with Iran, she held her hands wide and shook her head in disagreement.

The White House expressed its displeasure with the appearance by word and deed, dispatching Vice President Joe Biden on an overseas trip that meant he did not fill his customary seat behind the House rostrum during the speech. Nor did Netanyahu meet at the White House with Obama on his trip to the United States.

The prime minister was greeted with a roaring welcome as he walked down the same center aisle of the House chamber that presidents tread before their annual State of the Union speeches.

He also sought to smooth over any political unpleasantness, thanking Obama lavishly for the help he has given Israel since he became president. In a grace note, he took a moment to mention Senate Democratic Leader Harry Reid, who is back at work after suffering an eye injury in an accident at home.

At the same time, Netanyahu was unrelenting in his condemnation of the negotiations the administration is conducting with Tehran.

He said that with the concessions the United States was prepared to make Iran would not only gain nuclear weapons, but also eventually would become free of international economic sanctions. As a result, he said, it would be emboldened to finance even more terrorism around the Middle East and the world.

The result for Iran, he said, would be "aggression abroad and prosperity at home."

Instead, he said that if Iran wants to be "treated like a normal country, it ought to behave like a normal country."

"We've been told that no deal is better than a bad deal. Well this is a bad deal, a very bad deal," he said to loud applause.

Republicans applauded Netanyahu's remarks frequently, rising to their feet. Democratic lawmakers were far more restrained, although they cheered the Israeli leader's praise for Obama.

"I wish I could promise you, Elie, that the lessons of history have been learned," he said, to cheers.

A few moments later, he added, the applause swelling, "The days when the Jewish people remained passive in the face of genocidal enemies are over."

"Even if Israel has to stand alone, Israel will stand," he vowed, although he quickly added that it does not, and "American stands with Israel."

The Obama administration has complained that congressional Republicans injected destructive partisanship into the U.S.-Israel alliance by inviting Netanyahu to speak. But the White House played down the controversy in the hours before the address.

Senior adviser Valerie Jarrett called it "a bit of a distraction" but told MSNBC the dispute wouldn't undermine Obama's commitment to Israel.

"We share a common goal of ensuring that Iran does not develop nuclear weapons," Jarrett said, and disagree with Netanyahu only over "the tactics of how to get there."

The U.S. and Iranian sides met for two hours on Tuesday morning in the Swiss resort of Montreux, according to U.S. officials.