A contrite Matthew Perry has admitted he and a friend beat up a young Justin Trudeau when they attended the same elementary school together in Ottawa.

The actor, who famously portrayed Chandler on the hit sitcom Friends, didn’t sound proud of himself.

“We actually beat up Justin Trudeau,” Perry told late-night host Jimmy Kimmel on Wednesday night. “We both beat him up.”

Trudeau’s dad, Pierre Elliott, was prime minister at the time, but Perry says that wasn’t the reason they trounced the two-years-younger Justin.

“I think he was excelling in a sport so it was pure jealousy ... I think he was the only kid in school that we could beat up.”

The Massachusetts-born actor, who described himself as “half” Canadian, said he feels shame over the bullying and doesn’t like to think about it.

“I’m not bragging about this. This was terrible. I was a stupid kid,” Perry said. “In fact, I think at one point I tried to turn it into love play.”

Kimmel questioned why Canada provided no security to the young son of the prime minister, joking anyone who tried to beat up U.S. President Donald Trump’s son Barron would end up in “the stockades” or “Russia somewhere.”

The host also noted Trudeau is a “handsome guy,” to which Perry replied, “Boy, is he ever.”

Perry, whose mother was press secretary to P.E.T., did suggest that the incident might have been the turning point in young Justin’s life where he decided to become prime minister of Canada.

More likely, it was the point he decided to seriously take up boxing.

Trudeau’s office declined an opportunity to comment.

aartuso@postmedia.com