When French President Emmanuel Macron visited Jerusalem’s Old City Wednesday, he also walked in the footsteps of one of his predecessors, Jacques Chirac, by engaging in a heated argument with Israeli security.

The altercation broke out when security personnel pushed past the French detail and were first to enter the Church of Saint Anne, which is French state property.

“Everybody knows the rules. I don’t like what you did in front of me,” an animated Macron loudly told the Israeli personnel, speaking in English, in the crush to enter the building, which remains French territory under international treaties.

“Go out — outside please!” he added in a raised voice in scenes captured in video footage that quickly spread on social media.

The Roman Catholic church, located at the start of Via Dolorosa in the Old City’s Muslim Quarter, was offered by the Ottoman Empire to France in 1856. It is one of four French territories in Jerusalem.

The rules that have been in place “for centuries,” Macron told the Israeli officers, “will not change with me, I can tell you, okay? So everybody, respect the rules.”

“It’s France here, and everyone knows the rule,” he said, still in English.

Later, after he had made what was defined as a private visit to the Western Wall, Macron explained: “The Israeli security did excellent work when they accompanied me through the streets. Everything was calm. At the entrance to the Church of Saint Anne they stop, and French security takes over responsibility.”

A joint statement by police and the Shin Bet security service said Macron had asked personnel to respect the rules at the site after the French president’s security detail and the Israeli security team discussed whether they could enter with him.

“In accordance with the security arrangements coordinated beforehand, the French president and his people were accompanied in the church by a policeman and a member of the Shin Bet,” the statement said.

This statement added that the French leader’s team apologized for the confrontation after leaving the church and said Macron shook hands with the Israeli personnel before continuing his tour of the Old City while “accompanied by the [Israeli] forces and all the necessary means to maintain his safety as a high level individual visiting Israel.”

During his visit to the Old City, Macron also visited the Al Aqsa compound atop the Temple Mount, including the Dome of the Rock.

Macron will on Thursday attend a ceremony to commemorate the liberation 75 years ago of Nazi Germany’s Auschwitz death camp in what was then occupied Poland. While in the Old City, he also visited the Church of the Holy Sepulchre and the Temple Mount.

Wednesday’s tense scenes recalled a 1996 Jerusalem visit by late former president Chirac to the church.

Chirac got angry at Israeli soldiers for clinging too close to him and shoving well-wishers, residents and even accompanying journalists away when they tried to shake his hand or get close to him. Chirac heatedly told them their actions were a “provocation” and angrily asked: “What do you want? Me to go back to my plane and go back to France, is that what you want?”

When his procession arrived at the Church of Saint Anne, Chirac was angered to find armed Israeli officers inside the church. He demanded they leave before stepping inside himself.