Mr. Trudeau started his campaign just over a week ago already suffering from a political wound.

His image as a self-proclaimed feminist and someone who promised a new, collaborative approach to politics was badly battered by a dispute with his former justice minister and attorney general, Jody Wilson-Raybould. Ms. Wilson-Raybould, a former Indigenous chief, accused him and his mostly male aides of bullying her on how to handle a criminal case.

Canadians were left with a broad impression that he and his staff had ganged up on her, and approval ratings for his Liberal Party tanked.

Over the summer, the party recovered, and before this week, it was tied in polls with its main opponent, the Conservative Party, led by Andrew Scheer.

It is still too early to assess how much damage was caused by the wide publicity about the video as well as two photographs of Mr. Trudeau wearing brownface and a turban at an “Arabian Nights” party in 2001 at a school in British Columbia where he then taught. He has also said he wore blackface when he was in high school, at a musical performance.

But small swings in voting patterns have frequently decided Canadian elections.

[Read more about why blackface persists.]

Mr. Trudeau has been calling Liberals, leaders of community groups and others to apologize since Wednesday, when the first photograph was published. On Friday in Toronto he said he wanted to apologize directly to Jagmeet Singh, the head of the New Democratic Party and the first nonwhite leader of a major national political party in Canada.

But his gun announcement in Toronto was an effort to directly challenge his chief rival, Mr. Scheer.