The first time Andrzej Duda blocked his rival’s path to the presidency, Poland was in the grip of a national tragedy. President Lech Kaczyński had been killed in a plane crash and the constitution required that Bronisław Komorowski, then speaker of the country’s parliament, should become acting head of state.
But he had not reckoned on the fiercely loyal streak that runs through Mr Duda, an aide to the late president, who angrily rebuffed the emissary despatched by the parliamentarian to the presidential palace.
“A yellow banner on a news channel is not proof that the president is dead,” Mr Duda said, demanding to see an official death certificate for his boss.
Five years later the proud, conservative Catholic has again deprived Mr Komorowski of power, and this time for more than a few hours. Mr Duda’s victory over the incumbent in presidential elections this week has also raised eyebrows across Europe, where the unexpected result is widely interpreted as a political lurch to the right in Poland.
The relatively untested politician comes to lead a country that has one of Europe’s fastest-growing economies. Its power and influence in Brussels is at a historical peak, and its role as a key Nato ally on the Alliance’s eastern flank is becoming critical in the face of an aggressive Russia.
And as European solidarity frays in Athens and London, and ties with Russia strain relations between Brussels and many eastern states, Poland’s partners are nervously watching to see in which direction Mr Duda may attempt to steer a country that has become part of the EU’s central core.
Mr Duda has presented himself as the spiritual heir to the late Kaczyński, whose presidency is remembered for rancorous relations with Moscow and Berlin, suspicion of the EU and politicised investigations into domestic businessmen and the civil service.
Two days before his death, Kaczyński told his young follower that his generation would soon retire, adding: “You are the future of Polish politics and it is you that will be required to take things forward.” It profoundly affected the budding politician.
“His mission is not complete. He did not finish his work and today, I believe with all my heart, Poles expect that work to be resumed,” Mr Duda told Rzeczpospolita newspaper before his election. “Poland will change again and . . . see justice, fairness and equal opportunities.”
But that jars with his fresh-faced appearance and an energetic campaign that painted Mr Duda as the modern, forward-thinking face of his rightwing Law and Justice party.
He won many floating, centrist voters with pledges of an independent presidency, blending pragmatism with core Polish interests.
His decision whether or not to carry his mentor’s flame will come under scrutiny, not least because Law and Justice — now run by the late president’s twin brother Jarosław Kaczyński — is favourite to win the country’s parliamentary election in October. “Andrzej has always told me that it is never about politics, it is always about Poland,” says Marcin Kędryna, an old friend and colleague of Mr Duda. “He will be respectful and loyal to Jarosław but not his puppet.”
A keen skier and churchgoer who enjoys fantasy novels, Mr Duda’s sense of moral purpose was forged during his youth as a boy scout, a group steeped in heroic folklore among Poles for its role in fighting the Nazi occupation during the 1944 Warsaw Uprising. A diligent, smart, well-behaved student, he studied law in Kraków, where his parents were both professors.
He flirted with liberalism in the early 2000s, joining the democratic Freedom Union party — a fact he tried to play down during the election but may decide to promote in office to burnish his independent credentials. However, in 2005, having obtained his PhD, Mr Duda joined Law and Justice, and began a steady rise through the party structure under the guidance of Mr Kaczyński, whose chancellery he joined in 2008. After the president’s death, Mr Duda was elected to the Polish parliament in 2011, and in 2014 he became a member of the European Parliament. There he sat with the continent’s eurosceptics alongside Britain’s Conservatives, before being announced as Law and Justice’s presidential candidate.
His party, which favours close ties with the US and is against gay marriage and abortion, was consciously kept in the background of the campaign, which saw an indefatigable Mr Duda tour the country of 38m, giving more than 250 speeches across four months.
Instead, he placed his family centre-stage. His charismatic wife Agata, whom he married at 22, appeared at many events, and when a prominent journalist unfairly ridiculed his 20-year-old daughter Kinga, he demanded and won a grovelling apology.
That conscious effort to paint Mr Duda as an independent politician will continue in office, his campaign team have stressed.
But his surprise win, which even he did not expect until the final days of the election, has caught him unprepared. Without a team of people to set up his chancellery, or a core of close advisers, Mr Duda may have to rely on experienced party ideologues.
“He is ambitious and was a quietly respected member of the party,” said Mr Kędryna. “But he is not a party man. He sees politics as a service.”
Additional reporting by Zosia Wąsik
Get alerts on Poland when a new story is published