After the death Friday of communist Cuban leader Fidel Castro, several politicians in the United States reacted to the news, including President Obama, who offered condolences to the Castro family and extended “a hand of friendship” to the Cuban people.

Acknowledging that Castro’s death would be greeted by “powerful emotions” by Cubans in the country and in the U.S., the president left it to history to “record and judge the enormous impact of this singular figure on the people and world around him.”

He walked a fine line in noting that there were “countless ways in which Fidel Castro altered the course of individual lives, families, and of the Cuban nation.”

Mr. Obama mentioned his own efforts during his White House tenure “to put the past behind us,” despite the nearly 60 years of political discord between the U.S. and its island neighbor.

He concluded with a reminder to Cubans that they would always “have a friend and partner in the United States of America.”

Get Breaking News Delivered to Your Inbox

Earlier this year, the president made an historic visit to Cuba, following his efforts to normalize diplomatic relations between the U.S. and the island nation. Mr. Obama was the first sitting president to step foot on Cuban soil since Castro’s guerrilla force overthrew the U.S.-backed government in 1959.

President-elect Trump, who is spending the holiday weekend in Mar-a-Lago, his Palm Beach, Florida, resort, issued his own succinct statement on Castro’s death, delivering it on his favorite social media platform.

Fidel Castro is dead! — Donald J. Trump (@realDonaldTrump) November 26, 2016

His presidential transition team issued a longer statement two hours later, marking “the passing of a brutal dictator who oppressed his own people for nearly six decades.”

“Fidel Castro’s legacy is one of firing squads, theft, unimaginable suffering, poverty and the denial of fundamental human rights,” Mr. Trump said in the statement. “While Cuba remains a totalitarian island, it is my hope that today marks a move away from the horrors endured for too long, and toward a future in which the wonderful Cuban people finally live in the freedom they so richly deserve.”

He promised that his administration “will do all it can to ensure the Cuban people can finally begin their journey toward prosperity and liberty.”

The president-elect, via Twitter, has also weighed in on U.S. policies regarding Cuba in the past, pledging to “reverse” the Obama-led efforts to normalize relations between the two countries.

The people of Cuba have struggled too long. Will reverse Obama's Executive Orders and concessions towards Cuba until freedoms are restored. — Donald J. Trump (@realDonaldTrump) October 12, 2016

Vice president-elect Mike Pence also commented on Twitter, claiming that “[n]ew hope dawns” after Castro’s death.

The tyrant #Castro is dead. New hope dawns. We will stand with the oppressed Cuban people for a free and democratic Cuba. Viva Cuba Libre! — Mike Pence (@mike_pence) November 26, 2016

Other politicians had harsher reactions to Castro’s death, like Florida Sen. Marco Rubio, who is Cuban-American.

The Republican blasted Castro’s legacy as one of an “evil murderous dictator” who turned Cuba into “an impoverished island prison.”

He tweeted his full statement here:

History will remember Fidel Castro as an evil, murderous dictator who inflicted misery & suffering on his own people https://t.co/dXZshjRzu3 pic.twitter.com/AJ9c1MV2gu — Senator Rubio Press (@SenRubioPress) November 26, 2016

In another post to Twitter, Rubio further criticized Mr. Obama for his “pathetic” statement, slamming the president for neglecting to mention the “thousands [Castro] killed & imprisoned.”

California Rep. Ed Royce, the Republican chairman of the House Foreign Affairs Committee, had his own skewering statement on the dictator, saying that “no one should rule anywhere near as long as Fidel Castro did.”

“His legacy is one of repression at home and support for terrorism abroad. Sadly, Raul Castro is no better for Cubans who yearn for freedom,” Royce said.

The communist dictator, however, was “fondly” remembered by former President Jimmy Carter, who took several steps to normalize relations between the U.S. and the island nation during his time in office, including the establishment of “interest sections” -- now embassies -- in Havana and Washington.

“Rosalynn and I share our sympathies with the Castro family and the Cuban people on the death of Fidel Castro,” Mr. Carter said in a statement released Saturday by the Atlanta-based Carter Center. “We remember fondly our visits with him in Cuba and his love of his country. We wish the Cuban citizens peace and prosperity in the years ahead.”

In 2011, Mr. Carter visited with Castro in Cuba, telling reporters that he and the then-84-year-old leader had “welcomed each other as old friends.”

Former House Speaker Newt Gingrich, who Mr. Trump could tap for a post in his incoming administration, seemed to react to Mr. Carter’s statement Saturday with his own critical tweet: