The latest Ipsos survey showed Nawrocki with 51 percent of the vote, ahead of Trzaskowski with 49 percent.
An initial exit poll, conducted for broadcasters TVP, TVN and Polsat and released just after voting ended at 9 p.m. local time, had projected a Trzaskowski win.
An update shortly after 11 p.m. reversed that prediction, though the race remained too close to call.
After the final "late late poll" was released by Ipsos just after 1 a.m. on Monday, Nawrocki appeared headed for a clear, albeit narrow, victory.
Ipsos said its "late late poll” combined exit poll data with partial official returns from 90 percent of voting stations and had a margin of error of no more than 0.5 percentage points.
Official results are expected later on Monday.
After the initial projection pointed to his victory, Trzaskowski told supporters he was ahead by a "razor's edge."
Rafał Trzaskowski with wife Małgorzata on election night. Photo: PAP/Paweł Supernak
He thanked voters and all those who backed him in the race, pledging to "connect and build" if confirmed as the country's next president.
"This is a special moment in Poland’s history, and I am convinced it will help us all move forward ... to focus primarily on the future," he told the crowd.
"I will truly be the president of all Poles; I will be your president," he declared.
'We will win and save Poland'
Nawrocki, meanwhile, urged his supporters to wait for the official results.
Karol Nawrocki votes at a polling station in Warsaw on Sunday, accompanied by his family. Photo: PAP/Paweł Supernak
“We will win and save Poland," he vowed.
"We have to win tonight—and we know we will," he added, as updated projections and vote counts were expected later in the night.
If confirmed by the national electoral authority, Nawrocki's win could set up a period of heightened political tension and pose new challenges to the pro-European government of Prime Minister Donald Tusk, potentially leading to legislative gridlock, especially in judicial and social reforms..
The election outcome marks a significant shift in Poland’s political landscape, signalling a resurgence of right-wing sentiment.
His campaign emphasised traditional values and a cautious approach to European integration.
Trzaskowski’s narrow defeat underscores the polarisation of Polish society, with urban centres leaning liberal and rural areas favouring conservative policies,
Nawrocki, a conservative historian backed by the opposition Law and Justice (PiS) party, has pledged to veto liberal reforms, promote traditional Catholic values and align Poland more closely with Donald Trump's America.
Trzaskowski, a senior politician of Tusk's ruling Civic Coalition (KO), campaigned on a platform of strengthening EU ties and democratic institutions.
The close race highlighted deep divisions in Polish society over the country’s direction, with the president holding significant veto power over legislation.
The election saw high voter turnout, with 71.7 percent of eligible voters casting ballots, according to the updated exit poll.
In the first round of voting on May 18, Trzaskowski narrowly edged Nawrocki, winning 31.4 percent of the vote to Nawrocki's 29.5 percent. As no candidate won an outright majority, a second round had to be held.
The Polish president is the head of state and has the power to veto legislation passed by parliament, a key prerogative in a country where traditionalists and liberals are bitterly divided.