Canadian Prime Minister Justin Trudeau is under fire after a photo emerged of him wearing brownface to a party at a school where he was a teacher nearly 20 years ago. Trudeau, who faces re-election next month, said Wednesday night he "regrets it deeply."

"I should have known better," Trudeau told reporters. "I'm pissed off at myself. I'm disappointed in myself."

Trudeau was a 29-year-old teacher at West Point Grey Academy when the picture was taken, Liberal Party spokesperson Zita Astravas said in a statement to CBS News. The photo, first published by Time magazine Wednesday, was taken at a 2001 dinner, which had an "Arabian Nights" theme. Astravas said Trudeau was dressed as a character from Aladdin.

Get Breaking News Delivered to Your Inbox

In the news conference, Trudeau said he also dressed up "with makeup" and sang "Dayo" at a high school talent show.

Although there were calls for him to resign, Trudeau said, "We take this on a case-by-case basis."

He said he did not think it was racist at the time but "now we know better" and said it was "part of the conversations we all must have."

"I have worked all my life to create opportunities for people and fight against racism and tolerance and I can stand here and say I made a mistake when I was younger," he said.

A photo in the West Point Grey Academy yearbook. West Point Grey Academy, as obtained by Time

Andrew Scheer, the leader of Trudeau's opposition Conservative Party, said "what Canadians saw this evening is someone with a complete lack of judgment and integrity, and someone who is not fit to govern this country."

The leader of Canada's Green Party, Elizabeth May, tweeted that Trudeau "must apologize for the harm done and commit to learning and appreciating the requirement to model social justice leadership at all levels of government."

Trudeau, the son of late former Prime Minister Pierre Trudeau, ran for federal office in 2015 on a number of progressive promises. Immediately after being sworn in, he made international headlines when he promised a diverse, gender-parity Cabinet and answering "because it's 2015" when asked why he was doing it.

He launched his federal campaign for re-election this week, but Angus Reid Institute tracking indicated about 30% of Canadians approve of the job he's done, while about 60% disapprove.

Last month, an ethics watchdog found he had violated federal conflict of interest rules by improperly trying to influence a former minister in relation to a criminal trial facing major Canadian engineering firm SNC-Lavalin, according to BBC News.