HAVANA — Bells tolled in celebration and teachers halted lessons midday as President Raul Castro told his country Wednesday that Cuba was restoring relations with the United States after more than a half-century of hostility.

Wearing his military uniform with its five-star insignia, the 83-year-old leader said the two countries would work to resolve their differences “without renouncing a single one of our principles.”

Havana residents gathered around television sets in homes, schools and businesses to hear the historic national broadcast, which coincided with a statement by U.S. President Barack Obama in Washington. Uniformed schoolchildren burst into applause at the news.

At the University of San Geronimo in the capital’s historic center, the announcement drew ringing from the bell tower. Throughout the capital, there was a sense of euphoria as word spread.

“For the Cuban people, I think this is like a shot of oxygen, a wish-come-true, because with this, we have overcome our differences,” said Carlos Gonzalez, a 32-year-old IT specialist. “It is an advance that will open the road to a better future for the two countries.”

Guillermo Delgado, a 72-year-old retiree, welcomed the announcement as “a victory for Cuba because it was achieved without conceding basic principles.”

Yoani Sanchez, a renowned Cuban blogger critical of the government, however, said the development came with a price. Castro, she wrote, had made a “bargaining chip” of Alan Gross, the U.S. aid worker who was released from prison Wednesday while the U.S. freed three Cubans held as spies.

“In this way, the Castro regime has managed to get its way,” she wrote in a blog post. “It has managed to exchange a peaceful man, embarked on the humanitarian adventure of providing Internet connectivity to a group of Cubans, for intelligence agents that caused significant damage and sorrow with their actions.”

Fidel and Raul Castro led the 1959 rebellion that toppled the dictatorship of Fulgencio Batista. The U.S. initially recognized the new government but broke relations in 1961 after Cuba veered sharply to the left and nationalized U.S.-owned businesses.

As Cuba turned toward the Soviet Union, the U.S. imposed a trade embargo that has remained in place since 1962. Particularly since the collapse of the USSR in 1991, Cubans have confronted severe shortages of oil, food and consumer goods, forcing them to ration everything from beans to powdered milk.

The Cuban government blames most of its economic travails on the embargo, while Washington has traditionally blamed Cuba’s Communist economic policies.

Obama had already loosened some travel, trade and financial restrictions that have boosted remittances to an estimated $2 billion annually, while Castro has ushered in some significant free-market reforms, opening the door to private businesses. The result has been more opportunities for some, and more goods available for those who can pay.

While the measures announced Wednesday don’t include a lifting of the trade embargo, Cubans hope they will see more tourists and more hard cash.

“This opens a better future for us,” aid Milagros Diaz, 34. “We have really needed something like this because the situation has been bad and the people very discouraged.”

But others said they’ll wait and see.

“It’s not enough since it doesn’t lift the blockade,” said Pedro Duran, 28. “We’ll see if it’s true, if it’s not like everything here: one step forward and three steps back. For now, I don’t think there will be any immediate improvement after we’ve been living like this for 50 years.”

In his address, Castro called on Washington to end its trade embargo which, he said, “has caused enormous human and economic damage.”

Cuba is willing to discuss the great differences that remain on matters of national sovereignty, democracy and internal policies, he said. “We should learn the art of living together in a civilized manner in spite of our differences.”

The announcement resulted from secret U.S.-Cuba negotiations, which Castro said had been facilitated by the Vatican and the Canadian government. He expressed gratitude to each, “especially Pope Francis.”

Havana resident Gabriel Serrano said, “Raul, Fidel, Obama and the pope are covered with glory. … I’m 71 years old and this is news that I’ve waited so long for.”

The streets remained calm across Havana, but a mood of celebration was palpable. At the University of Havana, a spontaneous celebration erupted with students leaving their classrooms waving Cuban flags and singing.

Around the cathedral in Old Havana, people gathered in doorways and on sidewalks, gesturing excitedly as they discussed the news.