On her first visit to Greece since the eurozone crisis erupted three years ago, Merkel struck a conciliatory tone.

She reaffirmed Berlin's commitment to keep the debt-crippled Greek state inside Europe's single currency but offered Samaras no concrete relief ahead of a new report on Greece's reform progress due by next month.

"I have come here today in full knowledge that the period Greece is living through right now is an extremely difficult one for the Greeks and many people are suffering," Merkel said at a news conference with Samaras just a few hundred yards from the mayhem on Syntagma Square, outside parliament.

"Precisely for that reason I want to say that much of the path is already behind us," she added.

Samaras, who invited Merkel to Greece during a visit to Berlin in August, promised to press on with economic reforms necessary to restore confidence.

"The Greek people are bleeding but are determined to stay in the euro," he said. "They are not asking for more money or favours. They only want to get back on their feet as soon as possible and exit this recession."

On the other side of the parliament building, tens of thousands of demonstrators defied a ban and gathered to voice their displeasure with the German leader, whom many blame for forcing painful cuts on Greece in exchange for two European Union-International Monetary Fund bailout packages worth over 200 billion euros ($260 billion).

Greek riot police clashed with protesters who tried to break through a metal barrier to reach the cordoned-off area where Merkel and Samaras were meeting. Some demonstrators pelted police with rocks, bottles, and sticks.

At least 30 people were hurt or suffered breathing problems from tear gas and about 300 were detained, police said.

Four people dressed in World War II-era German military uniforms and riding on a small jeep, waved black-white-and-red swastika flags and raised their hands in the Hitler salute.

Banners read "Merkel out, Greece is not your colony" and "This is not a European Union, it's slavery".

"We know that she is not here to offer favours but she must help us, this is our last chance," said 45-year-old Mari Hanioti, a saleswoman supporting her two children and her unemployed husband.

"She must be able to see what we are going through, how much we are suffering. She should see the poor neighbourhoods not just the expensive hotels," she said.

Some 6,000 police officers were deployed for the six-hour visit, including anti-terrorist units and rooftop snipers. German sites in the Greek capital, including the embassy and Goethe Institute, were under special protection.

Before departing, Merkel met Greek business people to ask how reforms were progressing and hear how they were affected by an economy that has shrunk by a fifth in five years, leaving 25 percent of workers out of a job.

"She said: talk to me as if I wasn't a leader but a good reporter," one attendant said on condition of anonymity.

Merkel decided to come to show support for Samaras, a fellow conservative, as he struggles to convince reluctant, leftist coalition partners to impose more austerity on a society fraying at the edges after several rounds of cuts.

With a year to go until Germany holds a parliamentary election, Merkel also hoped to neutralize opposition criticism at home that she has neglected Greece and contributed to its woes by insisting on crushing budget cuts.

After her government flirted earlier this year with the idea of allowing Greece to exit the euro zone, she now appears determined to keep it in - at least until the German election is out of the way.

Greece is in talks with its "troika" of lenders — the European Union, European Central Bank and International Monetary Fund — on the next tranche of a 130-billion-euro ($170-billion) loan package, its second bailout since 2010.

Without the 31.5-billion-euro infusion, Greece says it will run out of money by the end of November.

Merkel said the aid payment was "urgently needed" but stopped short of promising that the funds would flow.

"The troika report will come when it is ready. Being thorough is more important than being quick," Merkel said.

Ties between Germany and Greece run deep. Thousands of Greeks came to Germany after World War Two as "guest workers" to help rebuild the shattered country and more than 300,000 Greeks currently reside there.

But the relationship is clouded by atrocities Greeks suffered at the hands of the Nazis. Samaras's own great grandmother killed herself after Nazi tanks rolled down the streets of Athens and the swastika flew over the Acropolis.

Greek President Karolos Papoulias, whom Merkel also met on Tuesday, fought against the Germans as a teenager, before fleeing to escape persecution by the Greek military dictatorship and finding refuge in Germany.