German leader Angela Merkel has visited Greece for the first time since the eurozone crisis began, amid draconian security measures.
Her five-hour stop was seen by the Greek government as a much-needed boost for the country's future in Europe - but protesters viewed it as a harbinger of further austerity and hardship.
More than 7,000 police were in Athens, cordoning off parks and other sections of city to keep demonstrators away from the German leader, who will hold talks with conservative prime minister Antonis Samaras.
As a helicopters buzzed overhead, thousands of protesters, chanting "History is written by the disobedient" gathered peacefully in front of Greek parliament, while one group of demonstrators burned a Swastika and threw it onto a police barrier.
"I have no doubt that (Merkel) has good intentions, and wants to help, but that won't solve Europe's problem," retired teacher Irini Kourdaki said.
Mrs Merkel will meet Mr Samaras and was also due to hold talks with president Karolos Papoulias before flying back out of the country.
At least 40 people were detained for questioning as police, even in unrestricted areas, stopped and searched pedestrians. Stiff security measures include a ban on public gatherings outside the German Embassy and other parts of central Athens as well as within 100 yards of her motorcade route from the airport.
The demonstrators included a group of special forces reservists, in uniform, who chanted "Merkel out of Greece" in time to their march.
"All the Greek people must rally together to rid the country of all those who oppress and humiliate us," Navy reservist Giorgos Drakopoulos said.
Many of Europe's leading politicians have avoided official travel to Greece and the risk of a hostile reception, as the debt-saddled country struggled to keep up with commitments needed to guarantee rescue loan payments and long-term euro membership. But Mrs Merkel, heading Europe's largest bailout contributor, accepted the invitation to Athens despite failure by his government so far to conclude a massive new austerity package.