Canadian Prime Minister Justin Trudeau wore “brownface” makeup and a turban to a costume party while teaching at a private school in 2001, according to a photo obtained by Time Magazine.

Trudeau, who was 29-years-old at the time, wore the skin-darkening makeup to an “Arabian Nights” gala hosted by the West Point Grey Academy in Vancouver, according to the Time report.

The photo shows Trudeau, the son of former Prime Minister Pierre Trudeau, wearing the turban with white Arab-style robes while covered in the makeup.

The photo became public one week after Trudeau launched his re-election campaign for Canada’s top government job — pulling in a virtual dead heat with his rival from the Conservative Party, the Wall Street Journal reported.

A rep for Trudeau’s re-election campaign confirmed to the New York Times that the photo was of him.

“He attended with friends and colleagues dressed as a character from Aladdin,” the spokeswoman, Zita Astravas, said.

The prime minister apologized Wednesday night, saying: “It was a dumb thing to do. I’m disappointed in myself. I’m pissed off at myself.”

As prime minister, Trudeau has cast himself as friendly to Canada’s minorities and promoted immigration into his nation.

After the photo was published Wednesday night, Trudeau was attacked by his Conservative Party rival — but also by Jagmeet Singh, the leader of the New Democratic Party.

“It’s insulting,” Singh, who is a Sikh, told reporters Wednesday evening.

“I think he needs to answer for it. I think he’s got to answer the question why he did that,” Singh added.

The leader of Canada’s Conservative Party, Andrew Scheer, pounced on the prime minister.

“Wearing brownface is an act of open mockery and racism. It was just as racist in 2001 as in 2019,” Scheer said in a video message Wednesday.

The photo appeared in the school’s yearbook and was given to the magazine by a Canadian businessman, according to the report.