By Adam Easton
BBC correspondent in Warsaw
One of the decisive factors in Lech Kaczynski's victory seems to have been people's fear of rapid free market reforms.
Lech Kaczynski has promised to push Polish interests abroad
During both the presidential and recent parliamentary elections campaigns, he and his Law and Justice Party repeatedly criticised their rival's economic plans as a "dangerous liberal experiment".
Losing candidate Donald Tusk and his Civic Platform party had proposed to limit state intervention and introduce a flat tax to boost growth and create jobs in the European Union's largest newcomer.
Mr Kaczynski said that would hurt the poor and promised to maintain welfare benefits.
Poland's unemployment - at just under 18% - is the highest in the EU and many in the country's poorer rural areas and small towns rely on state handouts just to get by.
More than two-thirds of voters in the countryside voted for Mr Kaczynski.
He courted and won the support of voters of the far-right League of Polish Families and the populist Self Defence after their candidates dropped out following the first round of the presidential elections two weeks ago.
"Having used the support of radical populists and the far right, you now have the responsibility to not let them ruin the country," Helena Luczywo wrote in a front-page editorial in Gazeta Wyborcza.
The Kaczynski campaign appealed to Catholics and conservatives
But the current mayor of the capital Warsaw also appealed to people's patriotic and Catholic values.
And he is also not afraid to appeal to populist sentiments. As mayor he twice banned gay parades in the city and spoke in support of reintroducing the death penalty.
He promised to assert Poland's views to neighbours and trading partners Germany and Russia.
The son of a World War II resistance fighter, 56-year-old Mr Kaczynski won much support among older voters for getting a state-of-the-art museum built commemorating Warsaw's failed 1944 uprising against Nazi occupation.
"I voted for Lech Kaczynski. He's from my generation, exactly my age. He's right about most of the important issues," said one woman voter as she left a polling station in Warsaw.
"He's in touch with our national goals and feelings. He's had some successes in Warsaw and somehow I trust him," she said.
Lech Kaczynski's victory caps a remarkable family history.
Mr Tusk's party is entering talks on forming a centre-right coalition
He first found fame in 1962 when he and his identical twin brother Jaroslaw charmed the nation as child actors with angelic faces in the popular film, The Two Who Stole the Moon.
Jaroslaw is now the chairman of the pair's Law and Justice Party. He is credited by many as being the strategist and architect of plans to create a new Fourth Republic.
The brothers are stridently anti-communist and Lech campaigned to become the "President of the Fourth Republic" to symbolise a complete break with communist influence.
The brothers are so similar that many here struggle to tell them apart. Jaroslaw, the elder by 45 minutes, turned down the post of prime minister so as not to endanger his brother's chances yesterday.
Instead, he proposed the little-known former physics teacher Kazimierz Marcinkiewicz as premier.
But few doubt that Jaroslaw will be taking many important decisions in the new government.
"The election of the 'President of the Fourth Republic' means that Jaroslaw Kaczynski will be both the back-seat prime minister and president," Andrzej Brzeziecki, a journalist from the country's liberal Catholic weekly Tygodnik Powszechy wrote in Gazeta Wyborcza.
Lech thanked his brother after the first exit polls showed he had an insurmountable lead saying, "Mr Chairman, mission accomplished."
Both Law and Justice and Civic Platform have pledged to restart talks to form a centre-right coalition on Monday.
Both parties have their roots in the Solidarity movement which helped overthrow communism in Poland. And both agree on the necessity of rooting out corruption in political and economic life.
But their differences over economic policy became all too apparent by the recent election campaigns. Much of the mutual criticism may just have been electioneering.
If it was not, this coalition government may well be short-lived.