US President Barack Obama noted that while "discord and profound political disagreements" marked the relationship between the US and Cuba for nearly six decades, Americans were extending "a hand of friendship to the Cuban people" during their time of grief.
"History will record and judge the enormous impact of this singular figure on the people and world around him," Obama said.
Elsewhere in world, Castro was honored and mourned by many present and former national leaders.
In a telegram to Cuban President Raul Castro, Fidel's 85-year-old brother, Pope Francis offered "my sense of grief to your excellency and family."
More From This Section
Francis broke from the Vatican's usual practice of having the secretary of state send official condolences. In a mark of the esteem the pope held for Castro, whom he met during a visit to Cuba last year, Francis signed the telegram himself.
Chinese President Xi Jinping said Castro "made immortal historical contributions to the development of socialism around the world."
"With his death, the Chinese people have lost a close comrade and a sincere friend," Xi said in a telegram to Raul Castro, state broadcaster CCTV reported. "His glorious image and great achievements will be recorded in history forever."
UN Secretary General Ban Ki-moon said he had vivid memories of meeting Castro in January 2014 and having "a lively discussion that covered developments around the world as well as sustainable development and climate change."
Salvador Sanchez Ceren, the president of El Salvador, said
he felt "deep sorrow ... Of my friend and eternal companion, Commander Fidel Castro Ruz."
Mexican president Enrique Pena Nieto tweeted that "Fidel Castro was a friend of Mexico, promoting bilateral relations based on respect, dialogue and solidarity."
Venezuelan President Nicolas Maduro recalled Castro's departure from Mexico on the yacht Granma with his brother Raul and several dozen supporters to start their revolution.
Ruben Berríos Martínez, longtime leader of the Puerto Rican Independence Party, called Castro the "largest and most influential Latin American of the 20th century, whose verticality, vision and passion has always served as an inspiration for those who aspired to a more just, free and dignified Latin America."
Brazil's former President Luiz Inacio Lula da Silva said on his Facebook page that Castro was his "friend and companion" and the "greatest of all Latin Americans."
A statement from the Spanish government hailed Castro as "a figure of enormous historical importance."
"As a son of Spaniards, former president Castro always maintained close relations with Spain and showed great affection for his family and cultural ties," the government statement said.
However, there were shouts and insults in Madrid as a small crowd composed of both pro- and anti-Castro supporters met in front of the Cuban embassy.
Turkey's foreign ministry commended the "legendary leader of the Cuban Revolution" for "instituting many deep reforms in his country from health care to education, art to science."
"India mourns the loss of a great friend," Indian Prime Minister Nerendra Modi said on Twitter.
Greek Prime Minister Alexis Tsipras tweeted: "Goodbye, commandante. Until the peoples' eternal victory."
"Fidel Castro in the 20th century did everything possible to destroy the colonial system, to establish cooperative relations," former Soviet President Mikhail Gorbachev was quoted as telling the Interfax news agency.