A 2001 photo shows that Canadian Prime Minister Justin Trudeau darkened his face dramatically as part of a costume for an "Arabian Nights"-themed gala, a spokesperson for Trudeau’s party confirmed to NBC News.

The photo was originally unearthed and published in a report from Time magazine Wednesday.

The photo was from a 2000-2001 yearbook from West Point Grey Academy, where Trudeau once taught, provided to the outlet by Vancouver businessman Michael Adamson, according to Time. The prime minister would have been 29 at the time of the photo.

A 2001 photo shows that Canadian Prime Minister Justin Trudeau wore blackface as part of a costume. Obtained by TIME

Zita Astravas, the media relations lead of the Liberal Party of Canada, confirmed to NBC News that Truedeau is in the photo, which was taken in 2001 at the school’s annual dinner, which had a costume theme.

"He attended with friends and colleagues dressed as a character from Aladdin," Astravas confirmed in a statement.

The prime minister addressed reporters on a plane Wednesday night and apologized, saying that he should have known better. Trudeau said he was "pissed off" at himself for doing it, but would not say whether he would resign.

"I shouldn’t have done that," Trudeau said. "I should have known better, but I didn’t and I’m really sorry."

He also said that the incident is something "that you have to evaluate on a case-by-case basis" and that he will continue to work to fight intolerance and discrimination.

"It was something I didn't think was racist at the time, but now I recognize it was something racist to do," the Prime Minister added.

When pressed by a reporter if it was only time he's ever done anything like this, Trudeau admitted, "When I was in high school I dressed up at a talent show and sang 'Day-o' — in makeup."

Trudeau, who is up for re-election in October, is already facing a tough campaign as a corruption scandal swirls around his administration.

The prime minister admitted in August that he breached ethics rules by trying to influence a corporate legal case after a watchdog's report.

Conflict of Interest and Ethics Commissioner Mario Dion said Trudeau and his team attempted last year to "circumvent, undermine and ultimately attempt to discredit" a decision by federal prosecutors that construction company SNC-Lavalin Group Inc should face a corruption trial.

Trudeau said he accepted the 63-page report from Dion's office but did not apologize, saying “many people’s jobs were at stake.”