Hungarian police are tackling the remnants of a group of violent protesters who disrupted celebrations marking the 1956 anti-Soviet uprising.
Tear gas and rubber bullets were used to quell anti-government protests in Budapest, where officials laid flowers to mark the uprising 50 years ago.
Some protesters commandeered a tank taken from an uprising exhibition.
Opposition to PM Ferenc Gyurcsany turned violent last month after he admitted lying to win re-election.
Some veterans of the 1956 uprising refused to shake hands with him at Monday's commemoration and the main opposition Fidesz party said it was boycotting events where he would speak.
Mr Gyurcsany caused political uproar recently when he admitted he had lied to the public about the economy.
But he denied any comparison between Monday's protests and their 1956 counterparts.
"The majority of Hungarians believe that parliamentary democracy is the most suited to express people's will and to create law and give a programme to a free Hungary," he said.
By the end of Monday, the number of protesters had dwindled from several thousand to a few hundred, most of them barricaded around Budapest's Elizabeth Bridge.
The BBC's Nick Thorpe in Budapest said long lines of riot police had moved down the streets, firing rubber bullets into crowds.
Our correspondent said he saw one man being carried away with what looked like a head wound from a rubber bullet.
The day's disturbances took place on the edge of a much bigger, peaceful demonstration, he said, adding that the picture in Budapest was confusing with several groups marching through the city to events at different locations.
It was difficult to tell whether the groups carrying Hungarian flags were marking 1956 or taking part in anti-government protests, our correspondent said.
In one incident, police rushed to stop an unarmed tank - similar to one used by the Soviets to quash the rebellion - that was being driven among the protesters. At least one man was pulled from the tank.
The agency said the protesters had been throwing rocks and pieces of metal at security forces.
Protesters have been present outside parliament for weeks, but were forced back in the early hours of Monday to make way for the official ceremonies.
President Laszlo Solyom has appealed for national unity.
Monday's events began with dignitaries taking turns to place white roses at the black marble monument to the uprising outside parliament, before heading inside to adopt a declaration of freedom.
The Hungarian uprising started in Budapest on 23 October 1956, with a spontaneous demonstration by a crowd of about 23,000, the reading of a pro-democracy manifesto and the singing of banned national songs.
A giant statue of Stalin was pulled down, leaving only the dictator's boots on the pedestal.
Soviet tanks were forced to withdraw, but returned with devastating force a week later.
The BBC's Allan Little says the uprising was the moment the world accepted the post-war partition of Europe and the apparent permanence of what Winston Churchill had called "the Iron Curtain".