Jeremy Corbyn has hailed Fidel Castro as a “champion of social justice”, following the announcement of the former Cuban leader’s death.

The Labour leader admitted to “flaws” in the revolutionary leader’s long rule over the Caribbean island, but praised him as a “huge figure of modern history”.

Mr Corbyn said: “Fidel Castro’s death marks the passing of a huge figure of modern history, national independence and 20th century socialism.

“From building a world class health and education system, to Cuba’s record of international solidarity abroad, Castro’s achievements were many.

“For all his flaws, Castro’s support for Angola played a crucial role in bringing an end to Apartheid in South Africa, and he will be remembered both as an internationalist and a champion of social justice.”

Mr Corbyn’s praise will come as no surprise because he is a long-standing supporter of the Cuba Solidarity Campaign, but will be controversial nonetheless.

In his statement, his only nod to the many human rights abuses under Mr Castro’s rule was to acknowledge “all his flaws”.

On a visit to Oxford, Mr Corbyn also spoke of the “stories of his heroism while living in Mexico in exile and then the boat to Cuba, the march to Havana and the revolution in 1959”.

And, he lauded the progress Cuba has made in recent years in opposing the death penalty, accepting LGBT [lesbian, gay, bisexual and transgender] rights and healing relations with the United States.

He added: “History will show that Fidel was somebody who stood up for something very, very different in the Caribbean and many independent people would say how good healthcare and education are in Cuba compared to many other places in the world.”

Addressing concerns that he was overlooking the suppression of human freedoms, Mr Corbyn said: “I have constantly raised the issues of human rights abuses everywhere in the world and if LGBT people are wrongly and badly treated and people are denied the freedom of speech, then that is wrong.”

He added: “I have never shied away from raising human rights concerns in any country in the world in any circumstances and I never will.”

In the years before becoming leader of the opposition, Mr Corbyn visited the Latin America state several times and attacked US policy towards it.

Mr Castro’s death at the age of 90 was announced by his brother Raul Castro and followed years of speculation about his ill health.