HAVANA — Cuba’s National Assembly on Thursday officially confirmed 57-year-old Miguel Díaz-Canel as Cuba’s new head of state, ending Castro rule after nearly 60 years and shifting power toward a younger generation born after Cuba’s revolution.

Walking next to Raúl Castro — the 86-year old who took over from his brother Fidel Castro in 2008 — Díaz-Canel entered the assembly hall in a dark suit and red tie to a standing ovation.

Díaz-Canel’s name was put forward Wednesday as the sole candidate to head Cuba’s council of state, a post that effectively serves as the presidency. On Thursday, officials announced the results of the vote: 603 to 1 backing his nomination as Cuba’s new leader.

Díaz-Canel’s selection amounts to the dawn of a new era in a country deeply identified with the Castros, who led the revolution that triumphed in 1959 and resulted in the most enduring communist system in the Western Hemisphere.

But Díaz-Canel, a consensus-builder, is almost sure to make decisions in concert with the country’s communist brain trust. As the country’s first vice president since 2013, he was wary of the thaw in relations with the United States under then-President Barack Obama and has tended to echo concerns that economic change should not occur abruptly.

In his inaugural speech, Díaz-Canel paid homage to the Castro brothers, Raúl and Fidel, as well as “the historic generation” of older revolutionaries who have run Cuba for the decades.

He vowed to bring “continuity to the Cuban revolution,” and to involve Raúl Castro “in the process of making the most important decisions to the future of the nation.”

He talked of cautious change, but always in the context of Cuban socialism.

‘There is no room for those who aspire to a capitalist restoration,” he said. “We will defend the revolution and continue to perfect socialism.”

Under Raúl Castro, considered more reform-minded than his long-ruling brother, Cuba has cautiously tested greater economic and social freedoms, often taking two steps forward and one step back. It will be up to Díaz-Canel to balance two realities: the need to respond to Cubans’ growing frustration over economic stagnation and the reluctance of the Communist Party to embrace faster reforms.

His touchstone, analysts say, will remain Raúl Castro — who will keep the influential job of head of the powerful Communist Party.

“You can look at Raúl Castro and Díaz-Canel as mentor and disciple,” said Carlos Alzugaray, a former Cuban diplomat.

The son of a mechanic, Díaz-Canel was born in the central province of Villa Clara. He became an electronics engineer at the Central University of Las Villas before joining Cuba’s Revolutionary Armed Forces. Afterward, he was a college professor and built ties to the Communist Party.

In 1987, he was assigned to be a liaison to Nicaragua, whose leftist Sandinista government received significant aid from Cuba. Díaz-Canel worked his way up to party secretary in his home province during Cuba’s “special period” in the early 1990s, when the collapse of the Soviet Union resulted in a cutoff of subsidized oil and an economic crisis.

He developed a reputation as an approachable, efficient manager who held impromptu front porch meetings in shorts and T-shirts. He also showed something of an independent streak — resisting party pressure, for instance, to shut down a newly established meeting place for gays and lesbians in his province.

In 2013, when he was education minister, Díaz-Canel intervened in a dispute involving a group of professors at Cuba’s University of Matanzas. They had started an independent blog — La Joven Cuba (Young Cuba) — offering critiques and commentary on Communist Party policies and personalities.

After their site was blocked on the university servers, a request came in to the professors. Díaz-Canel wanted to meet them.

“We had big speeches prepared, about how our blog was valuable to Cuban society,” said Harold Cárdenas, one of the professors. “But then, when we got there, [Díaz-Canel’s] first words were, ‘What do you need to keep doing what you do? And how can I help?’ ”

Cárdenas is now among those who see Díaz-Canel’s new role as a chance for measured change in Cuba.

“In the 1990s, he was one of the first Cuban leaders using a laptop, and now you see him using his tablet,” he said. “I do think Díaz-Canel can bring change, while also keeping continuity” in the system.

Still, Díaz-Canel’s position on freedom of expression may have hardened in recent years.

A video leaked last year, for instance, shows Díaz-Canel in a party meeting, threatening to block a website for acting “against the revolution.”

Since the video leaked, journalists at the site singled out by Díaz-Canel — OnCuba, a Miami-based outlet with offices in Havana — say they have received no official pressure to change their middle-of-the road editorial line. But the outlet has been the subject of attacks from pro-government bloggers, attacks that have served as a kind of message.

“We speak of Fidel as a man, not as a god, and of the Cuban community in Miami as being people who are not totally against this island,” said Mónica Rivero, editor in chief of OnCuba. She continued: “But it’s not really about us. It’s more about whether you can or can’t have this kind of change when it comes to expression . . . . Díaz-Canel is going to be in the shadow of Raúl and those who fought with Raúl and Fidel.”

Yet with new leadership, Cuba is indeed changing. The list of names presented for Cuba’s Council of State, which Díaz-Canel is set to head, notably excluded José Ramón Machado Ventura — an arch-conservative who fought in the revolution with the Castro brothers.

The new candidates also included the first black Cuban to hold the post of first vice president, and three female vice presidents. The results of the assembly vote are to be announced Thursday, but there is little doubt that those on the list will be approved.

All of those named to the powerful council are party loyalists. But their relative youth — the list includes Yipsi Moreno, a 37-year old former Olympic hammer thrower — suggested a passing of the torch.

“It’s very significant. It shows that Raúl has been successful in bringing into retirement much of the octogenarian group,” said Arturo Lopez-Levy, a former Cuban government analyst who is now a professor of political science at University of Texas Rio Grande Valley.

Before his death in 2016, Fidel Castro had sought to prevent the creation of a personality cult, forbidding statues or street names honoring him. In perhaps a nod to that policy, Cuba’s official news media was largely devoid on Wednesday of ponderous coverage of the Castro family’s ceding power.

Cuban television announcers used words such as “unity” and “continuity” in their broadcasts. State media tweeted under the hashtag #SomosContinuidad (We are continuity). The message was clear: The end of the Castro era does not mean the end of Cuba’s communist system.

For some elderly Cubans, the moment was hard to comprehend. “For me, not having a Fidel or Raúl, it’s almost impossible to conceive of. It’s almost out of my realm of understanding,” said Giraldo Baez, a 78-year-old former factory administrator. “But even as they go, I feel we still need to follow their ideas.”

Some Cubans, however, harbored cautious optimism that a new generation of leaders would be less tethered to Cuba’s past.

“For us, this is like trying to imagine a new color, one that you haven’t seen before,” said Charlie, a 22-year-old DJ who declined to give his last name. “We don’t want capitalism. That won’t work for us. But what we want is something that we haven’t seen yet.”

A new system will take time to come about, he said. “No one is expecting change overnight.”

Rachelle Krygier in Caracas, Venezuela, contributed to this report.