BUCHAREST — When he first ran for mayor of Romania's capital in 2012, Nicușor Dan expected to be ridiculed. He was an independent candidate who knew he had no chance. He did it to draw attention to local issues such as apartment buildings being built in public parks or historic buildings being demolished to make room for new, modern ones.

Four years later, Dan is the head of a new party, the Union Save Bucharest, and is challenging the candidate of the Social Democrat Party (PSD) in the Bucharest mayoral election on Sunday. Some polls place him second behind PSD's Gabriela Firea and ahead of Cătălin Predoiu, the candidate of President Klaus Iohannis' National Liberal Party (PNL).

In a country where the mainstream parties have a fearsome reputation for corruption, what began as a single-issue campaign against developers has tapped into the same public anger against politicians that last year forced out the Social Democrat Prime Minister Victor Ponta. He resigned after a deadly fire in a Bucharest night club that was blamed on safety officials who turned a blind eye to violations of the fire regulations at the club.

"It's a miracle that we are there, without any resources," Dan said in an interview in a private clinic in Bucharest where his first child — a girl — was born just a few hours earlier. His daughter arrived more than a month before the due date, surprising Dan but stunning some of his campaign staff, who had no idea that he and his girlfriend were expecting a child.

He never mentioned this during the campaign, even while his rivals like the PSD's Firea bragged about their children and pledged to uphold family values, while mostly deflecting accusations of corruption aimed at their parties.

Dan’s stated aim is to save Bucharest from politicians like the last mayor, Sorin Oprescu, who was jailed for graft, and other district mayors accused of money laundering, corruption or tax evasion. The message appears to be resonating with many voters.

Little Nick

The 46-year-old, whose first name translates as Little Nick, speaks softly and pauses for thought before answering questions, as befits an academic used to "solving problems" at the Mathematics Institute of the Romanian Academy.

As well as crunching numbers, he's taken the town hall, universities and other institutions to court many times over approval of projects he considers illegal: apartment and office buildings that would be taller than is permitted in certain areas of the city, for example. He filed lawsuits over construction of buildings that would cut into green space and challenged demolition orders for old buildings that are part of the city's cultural heritage.

He's kept a tally of the number of times that he has represented his NGO, the Association Save Bucharest, in such cases: "Five hundred mornings, I woke up and went to court," he said.

With no law degree, he wasn't very successful at the beginning. "I lost the first two lawsuits due to procedural issues." But since the part of the law he was working on was very narrow, he managed to learn and win some cases. "At the beginning people were laughing at me, now I am pretty good," he said with a smile.

Dan's reputation got him included in the list of civil society representatives summoned for consultation by Iohannis after Ponta's exit in November, in response to public clamor for a new political class free of corruption. The president then appointed a technocrat government led by a former European commissioner, Dacian Cioloș.

While denouncing the "profound corruption" of the traditional parties, Dan has made public a list of his campaign sponsors. Among the seven Romanian business donors are George Iacobescu, the Romanian engineer knighted by Britain for his role in developing London's Canary Wharf, and Florin Talpeș, CEO of the antivirus software firm BitDefender. Hundreds more smaller online donors are listed on his campaign website.

He then called on rivals to make their campaign finances public, but none have responded. "We will not make any type of compromises; we signed a contract in front of the notary that says there will be no demands [from the donors]," Dan said.

'Radicals against development'

Not everyone is convinced, in a country that finds it hard to believe a politician can have no ulterior motive.

"He is running for the specialized companies who can renovate historic buildings," said Gheorghe Grătar, a taxi driver who believes everyone lies to get elected.

The president of the Senate at the University of Bucharest, Marian Preda, last week accused Dan of serving the interests of a real estate company when he sued the university a few years ago for building two new buildings on campus. Dan responded that he had never taken money to file a lawsuit and would be suing Preda for libel.

There are also concerns in Bucharest that Dan's campaign could sacrifice development in the city at the altar of conservation.

"He created around him a team of people who became radicalized against development," said Șerban Marinescu, who teaches at the University of Architecture in Bucharest, recommending a less extreme approach and describing Dan's call for development to be moved to beyond the city limits as "anti-urban."

Marinescu doesn't rate Dan's chances of becoming mayor. A strong performance, however, would ensure his party seats in the city council and the councils of the capital's six districts, giving him a platform to make a difference, according to Marinescu.

Dan said he has a chance to become mayor. But a second place for his party would mark "a long-term commitment" to cleaning up the city's politics and preserving its heritage, he added.