OTTAWA — The re-election campaign of Prime Minister Justin Trudeau of Canada was thrown into turmoil on Wednesday when a photograph surfaced of him wearing brownface makeup at a 2001 private school party.

The photograph had been taken when Mr. Trudeau, then a 29-year-old teacher, attended an “Arabian Nights” themed costume gala at the West Point Grey Academy in Vancouver, British Columbia, according to Time magazine, which published the image.

[Oct. 21 is Election Day in Canada. Will Justin Trudeau’s Liberals win a second term? Get the latest results here.]

Speaking with reporters aboard his campaign plane, Mr. Trudeau, who has long championed the rights of racial minorities in Canada, confirmed that he was in the photo and that he was dressed as Aladdin.