ATHENS, Greece (CNN) -

German Chancellor Angela Merkel expressed solidarity with Greece Tuesday on a trip to Athens, even as tens of thousands of Greeks rallied to show their anger toward her over the hardship their country is suffering.

Critics see Merkel as the main enforcer of the European Union-imposed austerity measures that have left a large number of Greeks unemployed and streaming to soup kitchens for a hot meal.

Police estimated that as many as 25,000 people turned out to demonstrate in central Athens, despite a ban on protests in certain areas amid beefed-up security for Merkel's six-hour stay.

Merkel, who was making her first visit to Athens in several years, spoke of Greece as a partner and a friend to Germany as she addressed reporters with Greek Prime Minister Antonis Samaras.

Merkel noted that Greece was going through a "very difficult phase" in which many people were suffering, but she insisted the debt-stricken nation had made progress in reducing its deficit and passing reforms.

"It's for this reason that I would like to say that a huge part of the journey has already been accomplished," she said.

"Germany and Greece are going to work very closely together," she added, as fellow members of Europe and the euro single currency.

Samaras, whose coalition government is seeking new ways to implement budget cuts of 11.5 billion euros ($14.49 billion) to ensure the country receives another international bailout installment this month, also stressed the strong ties between the two nations.

"The Greeks are proud and they know how to show support for their friends, and we welcome a friend here today," Samaras said of Merkel.

Greece would show those speculators who had wagered on its collapse and exit from the eurozone that they were wrong, he said.

Greek President Karolos Papoulias also welcomed Merkel's visit at what he said was a very difficult time for his people.

"They have nearly exhausted how much they can take. And of course we need to think of measures that will give hope to these people that are suffering," he said.

Those measures must include steps to boost growth and create jobs for young people and women, he told the German chancellor.

Merkel and Samaras met with Greek and German business leaders following their joint news conference.

The crowds of protesters who gathered in Syntagma Square, by the Greek parliament building, had largely dispersed by Tuesday evening. Earlier, a number of people were arrested after objects were thrown at riot police.

Many protesters, some of whom belong to labor unions and Syriza, the radical-left opposition party, carried anti-Merkel banners.

"Merkel we are a free nation and not your colony," said one banner. Another read, "Merkel Raus (out, in German). Murderer of 3,500 Greeks," a reference to the number of Greeks who have taken their own lives, according to some estimates, as a result of the current hardship.

Before her visit, Merkel told CNN she knows the austerity measures have been hard on some.

"It's very bitter obviously, sacrifices need to be made," she said. "But I think these are necessary measures that have to be taken, I think it was not easy for anyone to impose those measures on them, but these, I think, have been made on the background of great experience."

Analysts say that for Merkel, who faces a general election next year, the Athens trip also sends a message back home that she views Greece as an integral part of Europe.

While some within her own governing coalition have spoken of the need for contingency plans for a possible Greek exit from the euro, Merkel has signaled that she would view that outcome as extremely risky. However, many German taxpayers are opposed to committing more European funds to Greece.

In return for international bailout funds, Greece has agreed to the austerity program and labor market reforms -- measures that have led to violent street demonstrations in the past.

Speaking in Syntagma Square, Syriza leader Alexis Tsipras said Merkel had come to Athens in support of Samaras and his ministers "while the people are on their knees ahead of new, barbaric measures."

But, he said, her visit would allow the Greek people to send a message to the rest of Europe that they were stronger than those supporting the bankers and bailouts.

"The democratic tradition of Europe will not allow a European people, the Greek people, to be transformed into a crisis 'guinea pig' and for Greece to become a vast social cemetery. We will win in the end, because we are right and we are many," he said.