The authorities, for their part, withdrew riot police from a flashpoint district of the capital, near the Dynamo Kyiv football stadium, where at least three protesters died in January in violence between ultra-radical activists and police.
Apparently accepting that the protesters had met the authorities half-way, the prosecutor's office said in a statement that the amnesty would come into force from Monday.
Criminal charges would be dropped against those protesters for violations committed between 27 December and 2 February, it said - a period that includes a week of clashes in which six people were killed and hundreds of police and protesters injured.
“I welcome release of activists and evacuation of city buildings as important steps to find political solution in Ukraine”, Barroso said on Twitter.
EU foreign affairs chief Catherine Ashton stated that she welcomed “several important steps” that had been undertaken during the last few days to de-escalate the situation in Ukraine, “thus contributing to a Ukrainian way out from the current political crisis”.
“In particular I welcome today's evacuation by activists of the Kiev City administration building as well as several other administrative buildings throughout the country”, Ashton said, adding thatshe also welcomed that “nearly all Maidan activists” had been released from pre-trial detention during the past days.
“I call upon the Ukrainian authorities to close now all pending court cases, including all house arrests. I expect such action to be taken without delay so as to facilitate the political dialogue in Parliament this week." Ashton said.
Despite the conciliatory moves, opposition leaders sought to keep up pressure on Yanukovich, telling a rally in Kyiv's Independence Square that he must abandon "dictatorial" powers and let them form a government independent of him.
On Tuesday, Yanukovich may present his candidate for prime minister to parliament - a choice that will show whether he is ready to make more concessions to the opposition after 12 weeks of often ugly street confrontation.
Opposition leaders made clear on Sunday they would also push in parliament for constitutional changes to reduce Yanukovich's powers.
The unrest was sparked by Yanukovich in November when he spurned a free trade agreement long in the making with the European Union and opted for a $15 billion (€11 billion) package of Russian credits and cheaper gas to shore up Ukraine's ailing economy.
The revolt spiralled into countrywide protests at perceived sleaze and corruption in the Yanukovich administration, and has triggered a geopolitical tussle between East and West.
As Russia beckons with the aid package, the United States and its Western allies have urged Yanukovich to move back towards an IMF-backed deal with Europe.
Club-wielding masked men
As Sunday's peaceful rally unfolded on Independence Square, attracting several thousand, young club-wielding masked men from the radical fringe of the protest movement were on patrol, looking for government agents known locally as "titushki".
A group of about 40 young men, wearing black balaclavas and carrying shields that announced they were from the 14th "self-defence" unit, marched through crowds gathered near the Dynamo Kyiv football stadium, a frontline in the unrest.
All the same, tensions in the area abated, with riot police leaving the streets and protesters opening a passage for limited traffic to pass barricades and reach government headquarters and parliament.
Western governments have expressed fears of an escalation of conflict and breakdown of law and order unless Yanukovich meets opposition demands.
On Sunday, former economy minister Arseny Yatseniuk repeated calls for constitutional changes that would strip Yanukovich of powers he has accumulated and enable an opposition government to be formed to lead the ex-Soviet republic to economic recovery.
After protesters departed Kyiv's City Hall, which they had occupied since early December, Yatseniuk urged Ukraine's judicial authorities to live up to their amnesty promise:
"We want about 2,000 criminal cases to be dropped. If this does not happen, we will start a peaceful offensive."
EU and OSCE support
Demonstrators had swept into the main municipal building shortly after Yanukovich decided to ditch the EU trade pact.
Switzerland, now chair of the OSCE human rights watchdog, sent an envoy to Kyiv to monitor the City Hall evacuation.
In Brussels, EU foreign policy chief Catherine Ashton said she expected the authorities now to close all pending court cases, including house arrests, "so as to facilitate the political dialogue in parliament this week".
Masked men in military fatigues and the demonstrators they had protected against riot police since mid-December filed out of Kyiv's city hall but threatened to return if authorities did not carry out the amnesty promise.
Opposition deputies said protesters had similarly pulled out of municipal buildings in several areas of western Ukraine, a hotbed of opposition to Yanukovich, and in one part of the southeast where the president has retained more support.
Andriy, 45, commander of about 100 men in black balaclavas leaving City Hall, said they were doing so on the understanding that charges against detained activists would be dropped.
A pivotal decision in coming days will be who Yanukovich names as his candidate for prime minister to replace the Russian-born Mykola Azarov, whom he sacked on 28 January in an unsuccessful attempt to appease the protesters.
He has until the end of the month to find one, although parliament speaker Volodymyr Rybak was quoted by Interfax as saying he thought Yanukovich might present his candidate to parliament on Tuesday.
With the hryvnia currency under pressure, he has to find a new steward of the economy quickly.
His choice could encourage a quicker disbursement of Russia's bailout package. But if he resists calls for constitutional change and names a hardliner, the streets could return to uproar.
Yatseniuk and Vitaly Klitschko, the leader of the opposition UDAR party and former boxing world champion, will meet German Chancellor Angela Merkel in Berlin today. The Ukrainian press writes that the two will ask EU financial assistance and visa-free travel for Ukrainian citizens.