OTTAWA -- Prime Minister Justin Trudeau condemned a deadly attack in the French city of Nice on Thursday as a "heinous" act of terrorism, saying that the perpetrators "do not get to define Muslims."

An attacker armed with a knife killed three people at a church in the Mediterranean city, French authorities said, prompting the country to raise its security alert status to the highest level.

"They were heinous, criminal acts, unjustifiable by any circumstance and an affront to all of our values," Trudeau said Thursday at a news conference after a virtual meeting with European Union leaders.

"The criminals, the terrorists, the cold-blooded murderers who perpetrated these attacks do not represent Islam," he added.

"They do not get to define Muslims in France, in Canada or anywhere around the world."

Trudeau also expressed his condolences to the victims' loved ones.

Earlier Thursday, Bloc Quebecois Leader Yves-Francois Blanchet called on Trudeau to issue a strong condemnation of the attacks, arguing the prime minister has not been forceful enough in denouncing previous ones.

Thursday's incident was the third attack in two months in France that authorities have attributed to Muslim extremists, including the beheading of a teacher.

Other confrontations and attacks were reported Thursday in the southern French city of Avignon and in the Saudi city of Jidda, but it was not immediately clear if they were linked to the attack in Nice.

It comes amid a growing furor over caricatures of the Prophet Muhammad that were republished by the satirical newspaper Charlie Hebdo -- renewing vociferous debate in France and the Muslim world over the depictions that Muslims consider offensive but are protected by French free speech laws.

"He cried 'Allahu akbar!' over and over, even after he was injured," said Nice Mayor Christian Estrosi, who told BFM television that two women and a man had died, two inside the church and a third who fled to a nearby bar but was mortally wounded. "The meaning of his gesture left no doubt."

The assailant in Nice was wounded by police and hospitalized after the killings at the Notre-Dame Basilica, less than a kilometre from the site in 2016 where another attacker plowed a truck into a Bastille Day crowd, killing dozens of people.

Shots punctuated the air and witnesses screamed as police stationed at the grandiose doors to the church appeared to fire at the attacker inside, according to videos obtained by The Associated Press.

Hours later, AP reporters at the scene saw emergency vehicles and police tape lining the wide Notre Dame Avenue leading toward the plaza in front of the basilica. For a time after the attack, sounds of explosions could be heard as sappers exploded suspicious objects.

France's anti-terrorism prosecutor's office opened an investigation into the attack, the third one since a trial opened in September for people linked to the 2015 attacks at Charlie Hebdo and a kosher supermarket by gunmen who claimed allegiance to the Islamic State group and al-Qaida.

The trial is nearing its end, with a verdict planned for Nov. 13, the fifth anniversary of another series of deadly Islamic State attacks in Paris.

Thursday's attacker was believed to be acting alone and police are not searching for other assailants, said two police officials, who were not authorized to be publicly named.

This report by The Canadian Press was first published Oct. 29, 2020.

-- with files from The Associated Press