Putin seems to command the unswerving loyalty of police and the military, whose wages have recently been doubled. The urban middle-class forming the core of the protests could be more reluctant to attend future protests after seeing the tough police response.

The police action followed a rally in downtown Moscow that drew about 20,000 protesters angry over a campaign slanted in Putin’s favor and reports of widespread violations in yesterday’s ballot.

The big rally went on peacefully, but hundreds of police in full riot gear violently dispersed several hundred protesters who had vowed to stay on the iconic Pushkin Square in downtown Moscow until Putin steps down. Police moved quickly to stamp out the protests, apparently fearing they could act as a catalyst for bigger demonstrations.

Charismatic protest leader Alexei Navalny, who sought to electrify the crowd with a passionate call of ‘‘We are the power!’’ was among those arrested along with opposition leader Sergei Udaltsov. Scores were put in police vans parked around the square.

Today’s attempt to occupy the square marked a change of tactics for the opposition that is looking for ways to maintain the momentum of the protests. During the first massive protests in December, Navalny was the first to propose occupying streets to raise the heat on Putin.

‘‘We are calling for peaceful action of civil disobedience, and we shall not leave,’’ he shouted to the crowd during today’s protest. ‘‘We know the truth about this government. This is the authority of crooks and thieves.’’

Putin won more than 63 percent of the vote, according to the nearly complete official returns, but the opposition says the election was marred by massive fraud.

‘‘The campaign has been unfair, cowardly and treacherous,’’ said opposition leader Grigory Yavlinsky, who had been denied registration for the race on a technicality.

International election monitors pointed at the lack of real competition and said the vote count ‘‘was assessed negatively’’ in almost a third of polling stations observers visited.

‘‘There was no real competition, and abuse of government resources ensured that the ultimate winner of the election was never in doubt,’’ said Tonino Picula, the head of the short-term Organization for Security and Cooperation in Europe observer mission. ‘‘Broadcast media was clearly biased in favor of one candidate and did not provide fair coverage of the other candidates.’’

Russian observers pointed at numerous reports of ‘‘carousel voting,’’ in which busloads of voters are driven around to cast ballots multiple times and various other violations, saying their number appeared to be as high as in December’s disputed parliamentary vote that kicked off the protests.

Today’s rally was sanctioned by authorities, but security was tight, with some 12,000 police deployed to ensure order.

While the rally’s attendance of some 20,000 was significantly smaller than some of the previous opposition protests, which drew up to 100,000, it could be explained by the relatively modest size of the tree-lined square. The rally organizers picked the location for its symbolic importance for the nation’s democratic movement and also its proximity to the Kremlin.

Udaltsov, one of the protest organizers, urged protesters to stay on the square until Putin steps down.

‘‘If it was a free election, why have they flooded the entire city with troops?’’ Udaltsov shouted to the crowd, which responded with cries: ‘‘They fear us!’’

After the rally ended, Navalny, Udaltsov and other opposition leaders were joined by several hundred protesters who heeded their call to stay on the square, chanting: ‘‘We shall not leave!’’

Hundreds of riot police surrounded them, but waited for more than an hour before they moved to break up the protest.

Shortly after his arrest, Navalny posted a picture to Twitter of a group of people detained along with him in the same prison van.

‘‘One man in a paddy wagon is calmly smoking an electronic cigarette. One is using his iPad to talk on Skype. One person is reading a book,’’ he wrote in a separate tweet.

Earlier, police also rounded up protesters who tried to walk toward the Kremlin after the big rally was over. They also quickly arrested Eduard Limonov, the leader of the banned National Bolshevik Party and several dozen of his supporters, who attempted to hold a protest on the Lubyanka Square near the headquarters of Russia’s election commission. The main KGB successor agency is also located on Lubyanka.

About 100 protesters were arrested in St. Petersburg, where about 2,000 gathered for an unauthorized rally.

Putin’s win was assured as he faced a weak slate of Kremlin-approved candidates and many across the vast country still see him as a guarantor of stability and the defender of a strong Russia against a hostile world, an image he has carefully cultivated during 12 years in power.

He has relied on massive coverage by state television stations, denouncing his foes as Western stooges working to weaken Russia.

The independent Russian elections watchdog Golos said today that incomplete reports from its observers of individual polling station counts contradicted the official vote count, indicating that Putin hovered perilously close to the 50-percent mark needed for a first-round victory.

‘‘It’s one pixel away from a second round,’’ said Golos’ Roman Udot.

Putin claimed victory yesterday night when fewer than a quarter of the votes had been counted, his eyes brimming with tears. He defiantly proclaimed just outside the Kremlin walls before a sea of supporters that they had triumphed over opponents intent on ‘‘destroying Russia’s statehood and usurping power.’’

US Sen. John McCain, who had goaded Putin in the past on Twitter, reacted quickly to the images of a tearful Putin with an acerbic Tweet: ‘‘Dear Vlad, Surprise! Surprise! You won. The Russian people are crying too!’’

The protesters on today derided Putin’s tears as evidence of his fear of the opposition. ‘‘We have seen a man who wasn’t sure of himself,’’ said Ilya Yashin, one of the opposition leaders.

Mikhail Kasyanov, who served as prime minister during Putin’s first term before becoming an opposition leader, urged the protesters to focus on demanding a rerun of the fraud-tainted parliamentary election in December, which allowed Putin’s party to retain its majority in the lower house.

In an apparenUS bid to assuage the opposition anger, outgoing President Dmitry Medvedev told the Justice Ministry to present its explanation for last year’s rejection of registration for the People’s Freedom Party, an organization led by some of the opposition’s most prominent figures.

He also ordered the prosecutor-general to re-examine the legality of the conviction of imprisoned former oil tycoon Mikhail Khodorkovsky and more than 30 others regarded by the opposition as political prisoners, in an apparent attempt to soothe protesters.

The West can expect Putin to continue the tough policies he has pursued even as prime minister, including opposing US plans to build a missile shield in Europe and resisting international military intervention in Syria.

The US administration congratulated the Russian people for turning out to vote in big numbers in yesterday’s election, but also expressed concern about allegations of fraud and urged a full investigation into the charges. The State Department said tonday the US would work with Russia’s ‘‘president-elect’’ once the votes are certified, but pointedly did not mention Putin by name or congratulate him.

Communist Party candidate Gennady Zyuganov was a distant second in the election, followed by Mikhail Prokhorov, the billionaire owner of the New Jersey Nets basketball team whose candidacy was approved by the Kremlin in what was seen as an effort to channel some of the protest sentiment. Prokhorov attended today’s protest.

The clownish nationalist Vladimir Zhirinovsky and socialist Sergei Mironov trailed behind. The leader of the liberal opposition Yabloko party was barred from the race.

BostonGlobe.com complimentary digital access has been provided to you, without a subscription, for free starting today and ending in 14 days. After the free trial period, your free BostonGlobe.com digital access will stop immediately unless you sign up for BostonGlobe.com digital subscription. Current print and digital subscribers are not eligible for the free trial.

Thanks & Welcome to Globe.com

You now have unlimited access for the next two weeks.

BostonGlobe.com complimentary digital access has been provided to you, without a subscription, for free starting today and ending in 14 days. After the free trial period, your free BostonGlobe.com digital access will stop immediately unless you sign up for BostonGlobe.com digital subscription. Current print and digital subscribers are not eligible for the free trial.