Jose Luis Rodriguez Zapatero brought the Socialists from the political wilderness to a spectacular election victory on Sunday and will now need his cool head and calm temper to unite Spain after its worst bomb attack.
Rodriguez Zapatero, who until Thursday's bombing was considered an outsider for Spain's top job, had angered many in his own party with his lack of aggression in the months after he took the leadership in 2000 following a heavy electoral defeat.
But his tendency to compromise may prove a valuable asset as he looks to form a government with left-wing allies or regional parties. It may also help Spain heal the scars from Thursday's train bombings which killed 200 people and injured some 1,500.
The attack appeared to have played a crucial role in a big poll swing to the Socialists, stirring anger at the ruling Popular Party's handling of the investigation and at outgoing Prime Minister Jose Maria Aznar's commitment to the US-led war in Iraq.
One of Zapatero's first acts as prime minister could be the withdrawal of 1,300 Spanish troops from Iraq. He has promised to pull them out if the UN does not take charge in Iraq by the end of June.
The unflappable Zapatero, who became Spain's youngest member of parliament at 26, then faces a tougher task as his government will need to appease powerful Catalan and Basque nationalists keen to wrestle more power from Madrid.
The 43-year-old will also need to court Spain's unions and old-style socialists and keep the loyalty of powerful barons who control the regional branches of his party.
Zapatero is often compared to Britain's "Third Way" advocate, Prime Minister Tony Blair.
The law student has stuck to a policy of "calm change" instead of rupture with old-school socialism.
"He is a 15-round fighter, the kind that gets into trouble in the first four rounds, and then gradually takes over," Manuel Garcia, his former law professor, told El Pais newspaper.
Unlike many of his fiery countrymen, Zapatero is famed for his coolness and colleagues say they have never seen him angry. Married with two children, Zapatero prides himself on his politeness but the word most used to describe him is "dull."
"He is a very serene person. He received the news of the result with a strange calm," said a senior Socialist politician of Zapatero's reaction to his election win.
In a country obsessively proud of its cuisine, Zapatero professes not to enjoy food and does not drink alcohol. He loves fishing in the rivers of his native northern province of Leon.
Zapatero realized he had politics in his blood aged 16 when he heard the will of his socialist grandfather, an army colonel executed by a fascist firing squad in the Spanish Civil War.
"My father read to my brother and I the will of my grandfather Captain Lozano who wrote a few hours before being shot in 1936, `I die innocent and I forgive,'" Zapatero wrote. "At that moment my biography begins."
When he turned 18, Zapatero joined the Socialist Party. He rose quickly through the ranks after the party won power in 1982 under its charismatic former prime minister Felipe Gonzalez -- one of Zapatero's heroes.
Ironically, Gonzalez -- who held power for 14 years until he was ousted by Aznar amid corruption scandals -- was one of Zapatero's most outspoken critics in his early days as party leader.