It’s no secret that many Israelis believe Europe is firmly against them.

But Spain in recent years has shown a decided shift from a staunchly pro-Arab policy to a fair view of the Middle East conflict.

That, at least, is the view of Israeli Ambassador Herzl Inbar, who is wrapping up his four-year stint in Madrid this month.

Spain’s newfound balance might even allow it to play a vital role in an Israeli-Palestinian peace process, Inbar said, hinting that Spain might again be chosen to host a peace conference, as it did after the first Persian Gulf War in 1991.

Inbar has also been pleasantly surprised by Spaniards’ surge of interest in their nation’s Jewish heritage.

“There’s not a single week without some symposium or seminar or book on this issue,” he said in an interview with JTA. “They’re rediscovering their Jewish roots.”

Nevertheless, Inbar still worries about the legacy of centuries of anti-Semitism in a country that expelled its Jews en masse in 1492. Today, however, bias against Jews and Israel is found mainly on the intellectual left — which, in Inbar’s view, sets the agenda for the nation’s press.

“For them, the Berlin Wall is still in place, and they haven’t noticed that Stalin is dead,” he said.

The Polish-born envoy, who made aliyah in 1957, is retiring after a diplomatic career that included stints in several Latin American capitals and as consul general in New York in the mid-1980s.

Inbar will be replaced by Victor Harel, currently the director for European affairs at Israel’s Foreign Ministry.

Inbar said Spaniards’ attitudes toward Israel have changed dramatically since the countries established diplomatic ties in 1986, 11 years after the death of dictator Gen. Francisco Franco, who was strongly pro-Arab.

The biggest changes have come in the last decade, he said.

“The main difference is that, before, the motto of Spanish politicians looking at the Middle East was ‘our traditional close ties with Arab countries,’ ” he said. “Now it’s ‘our good relations with both Israel and Arab countries.’ “

Inbar said the change is partly due to the involvement of Spanish political figures such as Javier Solana and Miguel Moratinos in the European Union’s Middle East peace efforts.

“It’s true they represent Europe,” he said, alluding to the generally pro-Palestinian bent across the continent. “But they were very familiar with developments in the area, and they personally know hundreds of Israelis. This has had a bearing on public attitudes and knowledge.”

He also said Spain’s own troubles with terrorist attacks by Basque separatists, and Prime Minister Jose Maria Aznar’s staunch support for the U.S.-led war on Iraq, have helped balance the equation.

And, Inbar noted, trade between Israel and Spain has grown to nearly $14 billion a year, with Israel now the largest importer of Spanish products in the Middle East. Dozens of Israeli high-tech companies have entered the Spanish market in recent years.

Nevertheless, describing his service in Madrid, Inbar says, “I’m not revealing any secret to say these have been difficult years.”

Anti-Semitism remains a powerful legacy in Spain, not only because of centuries of official discrimination against Jews but also because Spain stayed out of World War II and Spaniards weren’t chastened by the Holocaust like other Europeans.

“They don’t have the collective memory of trains being dispatched to Auschwitz. For them, the Holocaust is an intellectual matter, not an experience,” Inbar said.

As a result, the media establishment and some Spanish politicians are still vehemently anti-Israel, even downright biased against Jews, the ambassador said.

Such feelings cut across the political spectrum in a country where Roman Catholic traditions are still strong despite widespread secularization, he said.

“On the far right, there is religious prejudice from before the Second Vatican Council” in the 1960s, when the Vatican repudiated historical teachings accusing the Jews of deicide. “On the far left, there is the image of the Jew as a greedy capitalist.”

Inbar told the story of a Spanish political commentator “who is certainly not an enemy of Israel,” but who recently called Israeli government policies “perfidious.”

“So I asked him, ‘When was the last time you used the adjective perfidious in writing about the policies of a government?’ “

Inbar said the journalist apologized and said: “Look, we grew up with the notion of the ‘perfidious Jew.’ “

Nevertheless, Inbar was quick to add that there are some “outstanding journalists and academics” who have begun to question the received wisdom.

“When you talk to people on the street, they understand what we are facing,” he said. “They understand that it’s the same problem Spain is facing with terrorism, though to a different degree.”

Inbar noted that among the hundreds of guests at the recent Israel Independence Day reception were representatives from Israel friendship associations in each of Spain’s 17 regions.

These are clubs, mainly composed of non-Jews, that have organized themselves in response to the imbalance they see in the press, and have started to cooperate with the embassy in hosting Spanish-Israeli cultural events, Inbar said.