Haifa, Israel — However it may affect American public opinion, Barack Obama’s midsummer Middle East campaign tour had a powerful impact on the nations he visited — though not in the ways that most observers anticipated.

Image by Getty President Barack Obama tours Yad Vashem with the Holocaust museum’s chairman, Avner Shalev, while visiting Israel on July 23, 2013

Israelis, many of whom viewed Obama with suspicion because of his rumored coolness toward the Jewish state, awoke Wednesday, July 23, to accounts like the one in Yediot Aharonot, the country’s largest-circulation daily newspaper, likening the senator’s arrival to that of a “rock star.” Throughout the day, Israel caught a local strain of Obama fever, with constant news coverage, flags lining his route in the desert town of Sderot and breathless street corner discussions of every word he uttered. By the next day, after chats and photo-ops with political leaders, an hour-long trip to meet Palestinian leaders in Ramallah, and visits to Yad Vashem and the Western Wall, he appeared to have quelled many of the doubts.

“Everyone in Sderot thinks he was a charming young man,” Cheryl Ben-David, a Sderot mother whose house has been hit twice by rockets, told the Forward the next day. “People were impressed, especially those he visited whose house was hit. I think it was partly sincere and partly political interest.”

And Israeli President Shimon Peres, accompanying Obama to the Yad Vashem Holocaust memorial later in the day, told him: “The world and so are we with you. God bless you.”

Obama has been scoring poorly in Israeli opinion polls since his name began appearing several months ago. In the last poll before the visit, taken at the end of June, only 27% of respondents said they would like to see him become president, with John McCain preferred by 36%. But in a poll taken on the afternoon of the visit, the two switched places: Only 28% favored McCain for president, while 37% said they were rooting for Obama.

“He has said the things that people want to hear, and if you couple this with his charisma, which he got a chance to display, this visit could do great things for his standing among the Israeli public,” said pollster Mitchell Barak, CEO of Keevoon Research, Strategy & Communications.

Obama’s rising acclaim in Israel represented a swap of sorts, as he lost popularity among Palestinians and much of the Arab world. Palestinians had cheered Obama when he first emerged as a candidate — even winning an unwelcome endorsement from Hamas last April. A top adviser to the Islamic group’s leadership in Gaza, Ahmed Yousef, said then that his organization “supports Obama’s foreign policy vision.”

But now, just three months later, Hamas leaders greeted Obama’s Israel visit with undisguised vitriol. “Hamas considers the remarks of the Democratic candidate today to be part of the American policy of bias towards Israel and giving legitimacy to Israeli crimes against our people,” Hamas official Fawzi Barhoum told Western reporters in Gaza shortly after Obama appeared in nearby Sderot.

Even in Ramallah, where Obama met with Palestinian Authority President Mahmoud Abbas, the news wires were abuzz with articles quoting Palestinian shopkeepers, students and housewives voicing similar sentiments. Azizha Noful, a Ramallah-based correspondent for Saudi Arabian publications, told the Forward that she did not even cover the visit, because it was “not important.”

“Whether it’s McCain or Obama, people here say that nothing here will really change,” she said. “They will have the same policy on the Palestinian issue.”

At the end of the trip, Al Jazeera’s senior political analyst, Marwan Bishara, summed up the visit sourly. “Obama did not bother mentioning the occupation or illegal settlements; not even once in all his speeches,” he said. He also said that the visit to Sderot was “beyond the call of the campaign duty.” Obama is “bound by racial fear, political intimidation and lobbying influence,” he concluded.

Republican contender John McCain did not visit Ramallah at all when he was in Israel last March, but, unlike Obama, he had little Palestinian sympathy to lose.

In contrast to Arab skepticism, many Israelis saw the Democrat’s performance as a skillful display of diplomacy. Obama “got off to a very good start, having already condemned the bulldozer attack [of July 22] while he was still in Amman — an important move for Israelis — and it fell into place from there,” said Yehuda Ben-Meir, senior fellow at The Institute for National Security Studies and former deputy foreign minister.

A poll taken midway through the visit, and released on Israel Radio the next morning, indicated that the trip worked wonders for Obama. Not only had he had overtaken McCain among the overall public, but among Likud voters he had drawn even with the Republican at 28% each.

Yitzhak Katz, CEO of Ma’agar Mochot, the public opinion institute that carried out the poll, said the results could have more to do with Obama’s panache than his policies. “Obama is a promising and highly intelligent young guy who made a visit. His poll results may be less about ideology and politics and rather a sign of excitement at the visit and a kind of hospitality, a way of Israelis showing hospitality to him.”

Not every Israeli was won over. The chairman of the Council of Jewish Communities in Judea and Samaria, Dani Dayan, told the Forward: “He’s wrong in his backing for a two-state solution, and though a candidate who promises change, has fallen into the same trap as President Bush and others.” He also questioned whether Obama’s repeated reassurances on Iran would translate into action.

Centrist journalist Yair Lapid spoke for many across the political spectrum when he warned in a Yediot column that Obama’s warm words masked a lack of passion for the region. “In the coming days, he will prove to us in many ways how much he likes us,” Lapid wrote. “Yet after that he will go and take care of the things that really matter to him.”

“For Obama,” Lapid wrote, “any dollar sent to us means one dollar less for Detroit’s poor neighborhoods. Any flak jacket sent to the IDF is taken from a U.S. Marine in Iraq; any dispute with the Saudis will turn into inflated fuel prices at gas stations in Los Angeles.”

Whatever Israelis thought of Obama after seeing him up close, most agreed on one point: America’s choice of president is a critical matter for Israel. “Israelis feel very much at the moment like we are America’s stepchildren, and that this will affect us all very directly,” pollster Barak said, “whereas in the Arab world there is a sense it will make far less difference who becomes president.”