Raul Castro embraced Diaz-Canel and raised the hand of the new leader in the air, amid cheers from assembly members. Diaz-Canel then addressed the nation with a speech that was broadcast live on television, in which he promised to preserve Cuba's communist system while gradually introducing reforms.
"The people have given this assembly the mandate to provide continuity to the Cuban Revolution during a crucial, historic moment that will be defined by all that we achieve in the advance of the modernization of our social and economic model," he said.
Raul Castro will remain head of the ruling Communist Party, maintaining his status for now as the most powerful public figure in Cuba. But Cuba has turned the page on a new political era, marking the first time since the revolution that someone outside the Castro dynasty is leading the communist state.
For years, there was speculation that Raul Castro would pick one of his children to fill his shoes. Instead, he chose a man who wasn't even born when his older brother started a revolution and ultimately took control of Cuba in 1959.
"It falls on our generation to give continuity to the revolutionary process," Cuban National Assembly member Jorge Luis Torres of Artemisa province told The Associated Press. "We’re a generation born after the revolution, whose responsibility is driving the destiny of the nation."
Diaz-Canel has served as Cuba's first vice president since 2013, but he's kept a low public profile and was virtually unknown beyond the island nation until recently.
Born in the central province of Villa Clara in 1960, Diaz-Canel quietly climbed his way up the ranks of the ruling Communist Party. He gained prominence as party leader in Villa Clara and Holguin provinces, before becoming higher education minister and later moving on to the vice presidency.
Diaz-Canel also led the Cuban delegation to the 2012 Summer Olympics in London.
Those who know Diaz-Canel describe him as a hard-working, moderate politician dedicated to improving public services, according to The Associated Press. But he appeared to express some hardline views during a close-door meeting with Communist Party members last year, which was captured on video and leaked online to the public.
In the video, Diaz-Canel takes aim at Cuban dissidents, independent media and the embassies of several European nations in Havana, accusing them of participating in or supporting "subversion." He also says Cuba shouldn't make any concessions under the reconciliation agreement with the United States brokered by the Obama administration.
But Diaz-Canel has also publicly defended bloggers and academics who were critical of the Cuban government, under a system that represses dissent and is intolerant of criticism.
Now, as Cuba's newest president, the world will be watching his every move to see whether he strays from the path paved by the Castro brothers.
The Associated Press contributed to this report.