Mr. Díaz-Canel replaced José Ramón Machado Ventura, 82, and became one of the youngest members of Cuba’s political hierarchy. His elevation raised the curtain on an epic drama that had been envisioned dozens of times over the decades. Leader after leader has been mentioned as the next president of Cuba but now, with the Castro era drifting to a close, all the attention is focused on Mr. Díaz-Canel, who has been thrust into what experts describe as the most scrutinized leadership role in the country since Fidel Castro took power in 1959.

Several high-placed young guns who had been auditioning for the job have been banished from government since Fidel Castro fell ill and retired in 2006. Some were accused of corruption, others of disloyalty in the form of vulgar jokes (surreptitiously recorded) about Fidel Castro’s health and Raúl Castro’s political capabilities.

One of those sent packing off in an earlier purge — the Cuban expression is “plan pajama” — is an old boss of Mr. Díaz-Canel’s from their days at the Union of Communist Youth: Roberto Robaina, a brilliant mathematician and former foreign minister who can now be found painting or hanging out at his Havana restaurant, Chaplin’s Cafe.

But unlike others floated as possible future leaders, Mr. Díaz-Canel has managed to be officially anointed as the successor. No one else can claim that distinction, not even Che, Fidel Castro’s right-hand man during the revolution. And though much about Mr. Díaz-Canel remains a mystery, what is known suggests that Rául Castro made the selection. Mr. Díaz-Canel, though clearly an avowed loyalist, has little in common with Fidel Castro, in personality or outlook. He seems instead a younger, more casual version of Raúl.

Like Raúl, he is known for being funny and warm in small groups, and more demure when speaking to crowds. An engineer, he also shares with Raúl a hefty respect for competence over ideology, and an antipathy to showy appearances. While Fidel Castro took power riding a tank into Havana, Mr. Díaz-Canel is well known within Communist Party circles for riding his bike to work when he served as the top official in the province of Villa Clara. He was born there in a lush central region of sweet-smelling mills and pristine coastal keys on April 20, 1960. His father worked for a brewery and his mother was a primary school teacher, according to someone close to the family who did not want to be identified talking about the private life of a government official.