(CNN) - Sen. Ted Cruz, R-Texas, part of a Congressional delegation at Nelson Mandela's memorial service, walked out of the service Tuesday while Cuban President Raul Castro delivered his speech.
"Sen. Cruz very much hopes that Castro learns the lessons of Nelson Mandela," his spokeswoman, Catherine Frazier, said.
"For decades, Castro has wrongly imprisoned and tortured countless innocents. Just as Mandela was released after 27 years in prison, Castro should finally release his political prisoners. He should hold free elections, and once and for all, set the Cuban people free."
ABC News first reported this story.
President Barack Obama, along with former Presidents Jimmy Carter, Bill Clinton and George W. Bush attended the event in Johannesburg. Before eulogizing the former South African, Obama shook Castro's hand as he walked onto the stage – a rare gesture between the leaders of two nations that have not shared diplomacy in over a half century.
CNN Political Editor Paul Steinhauser contributed to this report.