With Prime Minister Benjamin Netanyahu facing a tough re-election fight in two weeks, the U.S. Congress has handed him an unprecedented boost with its effusive welcome to a message that resonates at home: Iran cannot be trusted as a threshold nuclear state.

Which way it goes for Netanyahu may hinge on whether Israel is in some perceptible way punished by the White House for its leader's extraordinary offensive against a U.S. president. If he is seen as having bravely spoken truth to power and escaped consequences, the episode will likely help him at the polls.

That could deeply affect the Middle East for years to come on issues far beyond Iran, most notably the conflict with the Palestinians, which some consider even more important than the nature of any future deal on Iran's nuclear program.

At home and abroad, Netanyahu is seen by many as a leading obstacle to peace with the Palestinians and perhaps the Arab world. And his insistence on continuing Jewish settlement of the occupied West Bank has many fearing the country will never be able to extricate itself from the territory and its millions of Palestinians — with or without peace — destroying Israel's character as a Jewish state.

For this and other reasons, Netanyahu has found himself at increasingly toxic loggerheads with the country's elites — from the security establishment to academics, journalists, cultural figures and much of the business world. This has been recently compounded by scandals involving his expenses, and rage from middle-class Israelis who struggle to make ends meet and can no longer afford to buy homes.

Polls show Netanyahu's Likud party slightly trailing the Zionist Union, which is the main grouping of the center-left opposition. In the highly fractured political environment, it seems plausible that the union's head, Isaac Herzog, may be given a first chance to form a majority coalition in the 120-seat Knesset after the March 17 vote.

Under these circumstances, while Netanyahu's speech was delivered to the U.S. Congress, his primary audience may well have been Israel's voters.

In a comedy show that aired just before the speech, a mock Netanyahu was portrayed filling out U.S. immigration forms on the plane. Under "reason for visit" he declared: "one or two seats" in parliament.

The images of Netanyahu mingling with congressional leaders and receiving standing ovations may achieve just that, or even better. Netanyahu made no mention of the election — but he deftly touched on Israeli fears and emotions with a litany of talking points that form the core of his political playbook.

He condemned Iran as dangerously hostile, with tentacles stretching across the Middle East — and managed to connect it to this week's Jewish holiday of Purim, in which ancient Jews defeated a Persian enemy. He presented Israel as peace-loving and progressive and stressed its deep bonds to the U.S. He even produced Nobel laureate and Holocaust survivor Elie Wiesel, who waved as Netanyahu intoned "Never Again."

Even opponents acknowledged the masterful political theater. "There is no doubt that Prime Minister Netanyahu knows how to speak," said Herzog.

But it was risky: Netanyahu's references to an emerging "bad deal" undermined a centerpiece of the U.S. administration's foreign policy and challenged its insistence that no deal has yet been struck.

The event was engineered by the Republican House speaker, John Boehner, and Netanyahu's ambassador to Washington, U.S.-born Ron Dermer, who once worked as a Republican operative. The White House made no secret about its unhappiness, making sure Secretary of State John Kerry and Vice President Joe Biden were not present and refusing to meet the Israeli leader while he was in town.

Dozens of congressional Democrats, caught between support for Israel and loyalty to the president, skipped the address. Some who attended gave it a cool response. Nancy Pelosi, the top Democrat in the House, said she was "near tears" and "saddened by the insult to the intelligence of the United States."

But the mood in Netanyahu's entourage was upbeat afterward. And Avraham Diskin, a political scientist at Hebrew University, said that to an Israeli audience Netanyahu's speech was "so exciting, so powerful" that "it will definitely help him in the campaign." Diskin noted, though, that the remaining two weeks are a long time in Israeli politics.

Much now depends now on the White House response. Although Obama is somewhat unpopular in Israel, if Netanyahu is perceived as having truly unsettled relations with the U.S., it could boomerang.

On Tuesday Obama dismissed the speech as nothing new and noted that it is the president who runs foreign policy.

But Israelis fear much worse.

The White House has already stopped briefing the Israelis on some sensitive details from the ongoing nuclear talks. And some in Israel fret that if Netanyahu is re-elected, relations with the White House will be poisonous for the remaining two years of Obama's term. That could undermine everything from weapons sales to critical and nearly automatic U.S. support at the United Nations and other international organizations where Israel finds itself increasingly isolated and under assault by the Palestinians.

"Netanyahu remains alone and Israel remains isolated," Herzog said. "The speech therefore caused damage of the utmost severity in relations with the United States ... and will only widen the rift with our great friend and our only strategic ally."

The Palestinians are also unhappy with events. Senior Palestinian official Nabil Shaath said the images from a supportive Congress cast doubts on America's impartiality in peace talks. "I think honest brokers don't do what the congressmen did with Mr. Netanyahu — the man who leads the occupation, the aggression against the people of Palestine," Shaath said.

Israel's opposition will try to turn attention back toward domestic issues, where Netanyahu is more vulnerable, and away from both Iran and the Palestinian issue. Herzog favors a far more conciliatory position, genuine negotiations and limits on settlements. But decades of inconclusive talks and intermittent violence have made Israelis tired of the Palestinian issue and inclined to look away — until it suddenly seizes center stage, as it so regularly does.

___

Associated Press writer Aron Heller in Washington contributed to this report.

___

Josef Federman is the Associated Press bureau chief in Jerusalem. Follow him on Twitter at www.twitter.com/joseffederman

Dan Perry is AP's Middle East editor leading text coverage in the region. Follow him on Twitter at www.twitter.com/perry_dan