Canadian Prime Minister Justin Trudeau said Friday that the government will ban military-style assault rifles if his Liberal Party wins the national election in October.

Trudeau's announcement comes two days after a photo surfaced of him wearing skin-darkening makeup while dressed as a character from Aladdin for an "Arabian Nights"-themed gala in 2001. The photo was published by Time magazine.

Two more instances of Trudeau's wearing blackface came to light Thursday. As he gave apologies, he said he could not say for sure that he had not darkened his face at other events.

The prime minister said Friday that if his Liberal Party is re-elected on Oct. 21, it would ban assault rifles and work with other levels of government to give municipalities the ability to restrict or ban handguns.

Gun violence in Canada is rising, and we’re doing something about it. We’re taking concrete steps to strengthen gun control by banning military-style assault rifles that have no place in Canada. pic.twitter.com/rQ5KVXzari — Justin Trudeau (@JustinTrudeau) September 20, 2019

"Thoughts and prayers aren't going to cut it," Trudeau said in Toronto's Greektown, the site of a shooting last year that left two people dead and 13 injured. "We know you do not need a military-grade assault weapon, one designed to kill the largest number of people in the shortest amount of time, to take down a deer."

The new gun laws would lead to a buyback program for previously purchased assault rifles, Trudeau said.

Polls conducted before the three blackface photos were published this week showed Trudeau was basically tied with his main rival, Conservative Party leader Andrew Scheer.

Gun-rights groups in Canada have been expecting new firearms restrictions if the Liberal Party is re-elected, the Canadian Broadcasting Corporation reported. Several groups said they are working to mobilize their members ahead of the election.