Opposition leaders denounced the clashes as a provocation aimed at discrediting the peaceful demonstration and charged that the people who incited the storming of the presidential office were government-hired thugs.
Several opposition leaders, including world boxing champion Vitali Klitschko, walked over to Yanukovych's office to urge protesters to return to Independence Square. Order appeared to have been restored by Sunday night, with rows of riot police standing guard behind metal fences.
Some protesters then headed to Yanukovych's residence outside Kiev, but their cars were stopped by police.
Speaking before the vast crowds on Independence Square from the roof of a bus, the opposition leaders demanded that Yanukovych and his government resign.
"Our plan is clear: It's not a demonstration, it's not a reaction. It's a revolution," said Yuriy Lutsenko, a former interior minister who is now an opposition leader.
Chants of "revolution" resounded across a sea of yellow and blue Ukrainian and EU flags on the square, where the government had prohibited rallies starting Sunday. Thousands of protesters remained late into the evening and some were preparing to spend the night on the square.
The demonstration was by far the largest since the protests began more than a week ago and it carried echoes of the 2004 Orange Revolution, when tens of thousands came to the square nightly for weeks and set up a tent camp along the main street leading to the square.
The opposition leaders urged Ukrainians from all over the country to join the protests in the capital.
"Our future is being decided here in Kiev," Klitschko said.
Ukrainian lawmakers meet Monday for consultations and planned to hold a parliament session Tuesday. The opposition is hoping to muster enough votes to oust Prime Minister Mykola Azarov's Cabinet after several lawmakers quit Yanukovych's Party of Regions in protest.
Protests have been held daily in Kiev since Yanukovych backed away from an agreement that would have established free trade and deepened political cooperation between Ukraine and the EU. He justified the decision by saying that Ukraine couldn't afford to break trade ties with Russia.
The EU agreement was to have been signed Friday and since then the protests have gained strength.
"We are furious," said 62-year-old retired businessman Mykola Sapronov, who was among the protesters Sunday. "The leaders must resign. We want Europe and freedom."
As the demonstrators approached Independence Square and swept away metal barriers from around a large Christmas tree set up in the center, all police left the square. About a dozen people then climbed the tree to hang EU and Ukrainian flags from its branches.
Several hundred demonstrators never made it to the square. Along the way they burst into the Kiev city administration building and occupied it, in defiance of police, who tried unsuccessfully to drive them away by using tear gas.
The EU agreement had been eagerly anticipated by Ukrainians who want their country of 45 million people to break out of Moscow's orbit. Opinion surveys in recent months showed about 45 percent of Ukrainians supporting closer integration with the EU and a third or less favouring closer ties with Russia.
Moscow tried to block the deal with the EU by banning some Ukrainian imports and threatening more trade sanctions. A 2009 dispute between Kiev and Moscow on gas prices resulted in a three-week cut-off of gas to Ukraine.
Yanukovych was traveling to China for a state visit this week. Afterward, the president planned to visit Russia and reach agreement on normalising trade relations, Azarov said Sunday.
For Yanukovych, memories of the Orange Revolution are still raw.
Those protests forced the annulment of a fraud-tainted presidential election in which he was shown to have won the most votes. A rerun of the election was ordered, and he lost to Western-leaning reformist Viktor Yushchenko.
Yanukovych was elected president five years later, narrowly defeating then-Prime Minister Yulia Tymoshenko, the leading figure of the Orange Revolution.
Tymoshenko was sentenced to seven years imprisonment in 2011 for abuse of office, a case that the West has widely criticized as political revenge. The EU had set Tymoshenko's release, or at least her freedom to go to Germany for treatment of a severe back problem, as a key criterion for signing the association pact with Ukraine.
The prospect of freeing his archenemy was deeply unattractive to Yanukovych, who comes up for re-election in early 2015.
- AP