A man was shot after attacking a police officer with a hammer outside the Notre Dame Cathedral in Paris on Tuesday.

>> Get all updates on terrorism in Europe: Download our free App, and Subscribe >>

The man shouted "this is for Syria!" before coming at three officers, who were patrolling outside the cathedral, with a hammer, French interior minister Gerard Collomb said.

"A man came behind these police officers and, armed with a hammer, started hitting one of them. His colleagues reacted with composure...and fired," Collomb told reporters near the cathedral in central Paris.

Collomb added that the injured attacked was being treated in hospital and seemed to have acted alone. He added that the assailant carried a Algerian student ID card.

The officer was lightly injured and the assailant was shot in the thorax, according to one source.

The French counter-terrorism office has opened an investigation into the alleged attack, the Prosecutor's Office said in a statement.

Large numbers of police cars filled the area on the Ile de Cite island in the River Seine in the center of Paris. Police have put the area on lockdown.

Witnesses described a dramatic police operation in the tourist-filled area. Lawrence Langner, a 73-year-old American visiting the neighborhood just across the Seine River from the cathedral, told The Associated Press that he suddenly heard a commotion and two detonations like gunshots.

Journalist David Metreau, who said his office overlooks the square that fronts Notre Dame, tweeted that there were two blasts that sounded like shots. He posted a photo of a body lying seemingly inert on the ground.

Others posted photos online of what appeared to be the interior of medieval Notre Dame, one of France's most-visited monuments, where hundreds of tourists are said to be sealed inside. Nancy Soderberg, a former U.S. diplomat, tweeted that she was locked inside the cathedral:

Around 5:45 P.M., police have started to let tourists out of Notre Dame cathedral. According to reports, officers are checking passports at the cathedral exit.

France is under a state of emergency after a wave of militant attacks since early 2015 that have killed more than 230 people across the country.

It has soldiers patrolling its streets alongside police to protect tourist sites, government buildings and events.

Three women were arrested in September after police found a car laden with gas cylinders abandoned near Notre Dame cathedral in what the interior ministry at the time said was a likely planned imminent attack.

Last April, a French policeman was shot dead and two others were wounded in central Paris on in an attack carried out days before presidential elections and quickly claimed by ISIS. The assailant was himself shot dead by police.