Moscow (CNN) -- Russian Prime Minister Vladimir Putin declared victory in the country's presidential election late Sunday, telling a crowd of thousands near Moscow's Red Square that "we have won" even as the votes were still being counted.
"We have won an open and honest fight," Putin told the cheering and flag-waving supporters who had braved the cold in Manezhnaya Square for hours to hear his expected victory speech.
With more than 56% of the votes counted Sunday night, Putin had more than 64% of the vote, more than enough for him to avoid a runoff. His closest challenger, Communist leader Gennady Zyuganov, had slightly more than had 17%; the other three candidates were in the single digits.
Putin, 59, served two terms as president, from 2000 to 2008, but a limit of two consecutive terms meant he had to step down.
He went on to serve as prime minister under President Dmitry Medvedev but continued to dominate Russian politics. And despite unprecedented public protests against his government since December, opinion polls ahead of the vote showed him on track to regain the top job.
Medvedev introduced Putin on stage at Manezhnaya Square, where the apparent winner called the election a "test of political maturity."
"We are appealing to all our people to unite for our people, for our motherland, and we will win," Putin told the crowd. "We've had a victory! Glory to Russia!"
A result of less than 50% for Putin, a former KGB officer and law student, would have required a runoff.
Ilya Ponomarev, a member of parliament from the A Just Russia party and a prominent protest figure, said he did not feel there was a fair counting of votes. Many polls before the vote, he said, showed Putin receiving around 40%.
"Mr. Putin remains to be one of the most popular politicians in the country, probably the most popular politician in the country, and it's quite natural that he's receiving the majority of the votes," Ponomarev told CNN from Moscow's Red Square. "But it should not be an overwhelming majority, and I think there has to be a runoff."
In the run-up to Sunday's voting, Putin's spokesman played down the public protests over the past three months.
"It's pure mathematics," Dimitri Peskov said. "Yes, we have something like 70,000 people out there (protesting) on Sakharov Avenue, but at the same time we have to keep in mind they are a minority. The majority of the population does not live here in Moscow. We have a huge country and if we look eastwards, we'll see lots and lots of big cities, small towns and rural populations that still support Putin pretty well."
Three policemen were killed in an attack on a polling station in Russia's southern republic of Dagestan after voting closed Sunday, police spokesman Alexander Gorovoy said. One of the attackers, who all wore masks, was also killed, he said.
Gorovoy said the Interior Ministry would vigorously investigate the attack.
Violence has plagued the republic for years, with Islamist rebels fighting Moscow rule in the region.
Opposition leader Alexei Navalny warned that the stakes were high in the voting.
"Vladimir Putin won't win on March 4 -- he will appoint himself as czar," he said. "He'll try to remain Russian president for the rest of his life. We need to fight and stop him from wrongly taking power. Our goal is to keep pressure on Putin."
Putin faced four other candidates in Sunday's election, including Russia's third-richest man, New Jersey Nets owner Mikhail Prokhorov. The billionaire businessman was the only fresh face in the pack.
Zyuganov is a serial election loser now facing his fourth defeat. Two other candidates, right-wing Vladimir Zhirinovsky and left-leaning Sergey Mironov, have also run and lost in the past.
On paper, Prokhorov 's manifesto of democratic and economic reforms should have appealed to many of Moscow's voters, but he struggled to shake a reputation of being too close to the regime. Cynics call him a Kremlin project, a candidate designed to credibly attract the middle-class vote without posing a genuine threat, and his numbers have remained in single digits.
While the result of Sunday's election looked all but certain, the political environment surrounding it is different from any other in recent Russian history.
Parliamentary elections in December triggered an opposition protest movement, regularly bringing tens of thousands of people to the streets to protest allegations of electoral fraud, challenge Putin's leadership and demand reform.
In that election, Putin's ruling United Russia Party received 49.5% of the vote -- down from 64% four years prior -- but enough to keep his party in power.
The demonstrations in the election's wake were considered, among analysts and political observers, the largest in Russia in the past two decades. Protests are expected again on Monday if Putin is declared Russia's next president.
CNN's Jill Dougherty contributed to this report.