JERUSALEM (AFP) - Hungarian Prime Minister Viktor Orban on Friday (July 20) ended a brief but controversial trip to Israel with a visit to a major Jewish shrine in Israeli-annexed east Jerusalem.

Wearing a dark hat in accordance with Jewish practice which says that men must not go bare-headed, Mr Orban arrived at the Western Wall - the holiest place at which Jews are allowed to pray - accompanied by its rabbi Shmuel Rabinowitz.

The rabbi's office said in a statement that the two men jointly recited a brief prayer from the biblical book of Psalms. Mr Orban headed to the airport after praying at the holy site.

Mr Orban placed a note in a crack between the wall's massive stones in keeping with the tradition of slipping written prayers or requests in between the stones that Jews believe were a supporting wall of their biblical second temple.

The Hungarian Premier, who arrived on Wednesday evening, has been accused of fanning anti-Jewish sentiment back home.

"Europe's Most Extreme Nationalist Leader Visits the Jewish People's Nation-State," the left-leaning Haaretz daily said in an analysis published on Friday, in reference to a contentious law passed on Thursday by the Israeli Parliament.

The government of Prime Minister Benjamin Netanyahu, seen as the most right-wing in the country's history, pushed hard for the law which defines Israel as the nation state of the Jewish people.

Israeli Arab lawmakers and Palestinians called the law "racist" and said it legalised "apartheid".

The middle-of-the road Yediot Aharonot had harsh words for Mr Orban's visit, which a columnist said mirrored Israel's slide into authoritarianism.

"Israel is undergoing an accelerated process of Orbanisation," columnist Nahum Barnea wrote.

"Under Orban's leadership, Hungary has broken free of the shackles of democracy. It is nationalist, racist, proud of its fascist past and tainted with anti-Semitism... In brief, it is everything we are evolving into."

Mr Orban and Mr Netanyahu greeted each other warmly when they met in Jerusalem on Thursday.

"I can assure the Prime Minister that Hungary has a policy of zero tolerance towards anti-Semitism," Mr Orban said.

"I heard you speak as a true friend of Israel about the need to combat anti-Semitism," Mr Netanyahu said.

Mr Orban's praise of war-time leader and Hitler ally Miklos Horthy as "an exceptional statesman" for rebuilding Hungary after World War I has ignited criticism among Israelis.

At the end of a Thursday visit to the Yad Vashem Holocaust memorial, his motorcade was briefly blocked by protesters holding black signs calling him a "dictator" and criticising Yad Vashem for hosting him.

Mr Orban, who described Mr Netanyahu and himself as "a Jewish patriot and a Hungarian patriot", lauded cooperation between the two nations.

In a break with protocol for EU leaders, who usually visit Palestinian President Mahmoud Abbas in Ramallah during such trips, Mr Orban did not meet the Palestinian leader.

Mr Netanyahu has sought closer ties with European nations willing to provide strong backing to Israel at the United Nations and in the European Union.

Hungary in December abstained when the UN General Assembly voted overwhelmingly to reject the US recognition of Jerusalem as Israel's capital.

It also joined the Czech Republic and Romania in blocking an EU statement criticising Washington's decision to move its Israel embassy to Jerusalem.

"You have stood up for Israel time and time again in international forums," Mr Netanyahu said.

"It is deeply appreciated, and it is important," he added.