A man with a hammer cried "This is for Syria" before bashing a police officer in the head outside Notre Dame Cathedral in Paris Tuesday, a top official revealed, as a terror investigation was under way.

The hammer-wielding man also had two kitchen knives and "other unsophisticated weapons" with him before charging toward officers patrolling the esplanade in front of the cathedral, French Interior Minister Gerard Collomb said. The wounded officer fired at the unnamed suspect twice, injuring the attacker who was later hospitalized, French police confirmed to Fox News. The specific conditions of both men were unclear.

The suspect had been threatening several policemen and passersby at the time, according to Collomb. Just before 5:30 p.m. local time, the operation was over.

Paris prosecutors have opened a counterterrorism investigation.

Paris has been under high security after a string of Islamic extremist attacks in recent years. In February, a man attacked soldiers outside a shopping mall near the Louvre. He was heard yelling "Allahu Akbar" before soldiers shot and injured him. Another attacker opened fire on a police van on Paris' Champs Elysees in April, killing one and seriously wounding two others. Police shot and killed the attacker in that situation.

TIMELINE OF RECENT TERROR ATTACKS AGAINST THE WEST

French President Emmanuel Macron planned a special security meeting to examine new counterterrorism measures, including extending the country's state of emergency, Collomb said.

Paris police intially wrote on Twitter around 4:30 p.m. local time that there was a "number of police" in the area and urged people to avoid the world-famous cathedral as the incident unfolded. The French U.S. embassy alerted American citizens to "avoid the area and follow advice of authorities" following the incident.

Paris Mayor Anne Hidalgo tweeted that she saluted the police officers' "courage."

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.

On social media, people reported that they were "trapped" in the cathedral for an incident outside. One person in the cathedral said officers instructed them to "raise their hands." French police later said they would be letting visitors out after conducting security checks.

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

Manuel Valls, the former prime minister of France, wrote on Twitter he "extended [his] full support to the police assaulted."

The Associated Press contributed to this report.