Emmanuel Macron reprimanded an Israeli security officer who apparently attempted to enter a French-owned church during a tour of Jerusalem, mirroring a similarly testy exchange in 1996 involving his predecessor Jacques Chirac.

The French president was on a visit to the walled Old City on Wednesday before a Holocaust memorial event hosted by Israel on Thursday.

Stopping to visit the church of St Anne, he was seen by journalists shouting at a man in the doorway. “Outside, please,” he said in English, according to a film taken by a reporter from Le Parisien.

Coup de colère de #Macron contre la police israélienne à Jérusalem. Dans les pas de Chirac en 1996 pic.twitter.com/DKP5ICThTK — Ava Djamshidi (@AvaDjamshidi) January 22, 2020

As a gift for his help in the Crimean war, the Ottoman Sultan Abdülmecid handed the basilica to the French emperor Napoleon III in 1856. Its grounds are still considered French territory.

Israel captured and occupied all of Jerusalem in a 1967 war and later annexed the city, to outcry from the Palestinians who live in its eastern districts. Despite repeated diplomatic appeals, France and most world powers never recognised Israel’s claims.

Meanwhile, Paris’s claim to the church remains in place. “Please respect the rules. They [have been in place] for centuries. They will not change with me,” Macron said.

In 1996, Chirac also lost his cool, shouting that his treatment by Israeli security agents was a “provocation”.

Filmed squeezed in a crowd of people, the former president angrily questioned an officer. “What do you want? Me to go back to my plane and go back to France? Is that what you want?” he said. Chirac later refused to enter St Anne until Israel security left.

Israeli police and the domestic intelligence agency, Shin Bet, said in a joint statement on Wednesday it had been agreed in advance that a police officer and Shin Bet guard would escort Macron inside the church.

The statement said that after Macron finished the visit “he apologised about the incident and shook hands with the security personnel”.