The prime minister is facing criticism for his statement expressing "deep sorrow" about the death of the controversial former Cuban president Fidel Castro.

Justin Trudeau posted a written statement early Saturday after the late-night announcement that Castro had died at the age of 90.

Trudeau remembered the late president as a "legendary revolutionary and orator," and said he was a good friend of his father's.

But others in Canada were less generous in their description of the controversial leader.

Opposition leader Rona Ambrose said in a written statement that under Castro's rule, thousands of people were impoverished, imprisoned and executed.

"My thoughts and prayers are with the people of Cuba who continue to endure his long and oppressive regime, even after his death," she wrote.

NDP Leader Tom Mulcair shared a similar message on Twitter.

Upon the passing of Fidel Castro let us think of the lives impacted by his actions and be hopeful for the future of the Cuban people. —@ThomasMulcair

Foreign Affairs Minister Stéphane Dion was also more subdued when responding to Castro's death on Twitter.

An iconic figure of the 20th century passed away last night. Deepest condolences to the people of <a href="https://twitter.com/hashtag/Cuba?src=hash">#Cuba</a>, following the death of Fidel Castro <a href="https://t.co/1d8u2eZNJQ">https://t.co/1d8u2eZNJQ</a> —@MinCanadaFA

Trudeau condemned on social media

And many people — particularly members of the Conservative Party — are condemning the prime minister's statement, pointing out human rights violations during Castro's half-century regime.

Conservative leadership hopeful Lisa Raitt wrote on Facebook that Trudeau should be ashamed of himself after his remarks.

"With those words, Justin Trudeau has placed himself on the wrong side of history — against the millions of Cubans yearning for freedom. The Prime Minister should be ashamed of himself. He must retract this statement and apologize," she wrote.

No <a href="https://twitter.com/JustinTrudeau">@JustinTrudeau</a>, Castro was not a 'remarkable leader', he murdered and imprisoned thousands of men, women and children. —@lraitt

Raitt added in her open letter to Trudeau that he "dismissed Castro's crimes as simply 'controversial.' They were not controversial. They were egregious crimes against humanity, and you should be ashamed to give your approval to a brutal regime that exported terror."

Raitt also called on Trudeau to "decline in the strongest terms" if he is invited to Castro's funeral.

"Canada must not be seen celebrating the life of a tyrant," she wrote.

Maxime Bernier, Quebec MP and a candidate for the leadership of the Conservative Party, turned to social media to express his disbelief at Trudeau's tribute, calling it repugnant.

"I can't believe our PM is expressing 'deep sorrow' and calling [Castro a] 'legendary revolutionary' and 'remarkable leader,'" Bernier said on Twitter.

"Cuba’s longest serving President." <br><br>.<a href="https://twitter.com/JustinTrudeau">@JustinTrudeau</a>: It's called a DICTATOR. <a href="https://t.co/b33GA5W28Y">pic.twitter.com/b33GA5W28Y</a> —@MaximeBernier

Bernier also called Castro a "despicable dictator who killed and imprisoned thousands of innocents and drove away in exile more than a million."

"He persecuted gay people, he was against freedom of speech and repressed free expression. He was not a president. He's a dictator. So I'm not very comfortable with that press release," he told The Canadian Press.

Conservative leadership hopeful Kellie Leitch wrote on Facebook that Trudeau should have called Castro's administration "brutal, oppressive, and murderous," rather than describing him "as if reading from a storybook."

And while former prime minister Stephen Harper hasn't weighed in, his son Ben Harper has.

The younger Harper tweeted that Trudeau's statement is "an embarrassment for Canada."

Correct Response: Castro was a monsterous leader, and the world is better off now hes dead. <a href="https://t.co/shXz2nlbrf">https://t.co/shXz2nlbrf</a> —@Ben_S_Harper

International reaction

Others mocked the prime minister's praise for Castro and tweeted fake eulogies for other polarizing figures using the hashtag #trudeaueulogies. Trudeau's comments also garnered criticism in the United States, a long-time political adversary of Cuba.

U.S. Senator for Florida Marco Rubio, who also ran against Trump in the last presidential election, questioned if Trudeau's statement was real or a parody and said it's shameful and embarrassing if it's real.

Is this a real statement or a parody? Because if this is a real statement from the PM of Canada it is shameful & embarrassing. <a href="https://t.co/lFXeqU7Ws0">https://t.co/lFXeqU7Ws0</a> —@marcorubio

Texas Senator and former Republican presidential hopeful Ted Cruz also commented on Trudeau's statement on Twitter saying, "Disgraceful. Why do young socialists idolize totalitarian tyrants? Castro, Stalin, Mao, Pol Pot — all evil, torturing murderers."

Cruz got a response from Canadian Senator Leo Housakos who said, "Sadly, our [PM] has no respect for our democratic way of life and basic human rights and freedom."

Website Breitbart News, which was previously run by president-elect Donald Trump's senior strategist, called the prime minister a "pretty little liar" in response to his comments.

And Ian Bremmer, an American political scientist who specializes in U.S. foreign policy, tweeted that "Cuban citizens and exiles deserve better" from Trudeau.

'Larger than life leader'

In his statement, Trudeau remembered Castro as "a larger than life leader."

Trudeau, who is attending the Francophonie Summit in Madagascar, expressed his deep sorrow at learning of Castro's passing.

His statement offered condolences on behalf of all Canadians and at the same time acknowledged that Castro was "a controversial figure."

Castro was divisive. To some, he was a revolutionary icon. To others, he was a totalitarian dictator. His system of one-man and one-party rule kept him in power for 49 years, the longest of any head of government in the world.

Trudeau also referred to the late president as a "legendary revolutionary and orator."

The prime minister went on to say that "Mr. Castro made significant improvements to the education and healthcare of his island nation."

"We join the people of Cuba today in mourning the loss of this remarkable leader," the prime minister said.​ "I know my father was very proud to call him a friend."