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.
To comply with the belt-tightening measures, salaries have been cut for many workers in Greece, pensions and benefits have been slashed, and unemployment rates have soared.
As of May, 53.8% of Greeks younger than 25 were unemployed, according to Eurostat, the statistics division of the European Commission.
A number of those who demonstrated in Athens on Tuesday said it was the first time they had taken to the streets to protest the economic crisis -- a reflection, perhaps, of how widely the anger over austerity is now felt.
Many of the protesters were retirees, a group that has lost, in many cases, more than 30% of its income since the crisis hit. Retirees are also among the groups that will be most affected by the new measures to which Greece must agree in order to receive the next tranche of its international bailout loan.
Maria Kirioni, a 53-year-old civil servant, told CNN she was protesting for the first time since she was a university student. "Merkel does not know what is going on in Greece. She only hears the politicians' voices. We must show her. It would be better if she stayed longer to see the reality," Kirioni said.
Stella Gianakopoulou, a 56-year-old schoolteacher who lived in Wupertal, Germany, for 18 years, said: "Merkel will cause the eruption of Greek society, and then this will spread throughout southern Europe. This may lead to a eurozone collapse."
But Rafael Voulgarakis, a university student, welcomed the German chancellor's visit. "It is clearly positive, because as we know, Germany is the largest power in Europe at the moment and one of the largest powers in the world," he said. "It is clear that the support of Ms. Merkel is good for our country and is needed."
CNN iReporter Margaret Roesler, from Minnesota, saw the buildup to the protest. "It seemed like a fairly tense atmosphere," she said. "The main road near our apartment was absolutely deserted, seems like everything shut down for the day. Someone told us to use extreme caution and to leave as soon as possible, which we did."
German Foreign Minister Guido Westerwelle told Bild newspaper last week that Greece deserves "fairness and respect." He suggested that Merkel's visit represents a show of eurozone solidarity between nations that are fiscally healthy and those that are debt-ridden and battling savage cuts and social unrest.
Christoph Weil, a senior economist at Commerzbank, told CNN that Merkel's visit to Athens comes as a "surprise" and that there was "a significant risk that Greece will exit the euro in the next two years."
However, Wolfango Piccoli, director of Eurasia Group, says that the risk of a Greek exit from the eurozone remains "marginal" at the moment and that the so-called troika -- the European Commission, European Central Bank and International Monetary Fund -- will provide Greece with the next tranche of bailout funds to meet its debt obligations.
But Piccoli warns that the country will have to undergo stringent austerity measures before creditors will release any funds.
"The vast majority will come from an additional round of cuts to wages and pensions. It's going to be almost 8 billion euros of the 13.5 billion euros coming from that. The total cut is 11.5 billion euros and then 2 billion euros of additional taxes," he told CNN.
On Monday, the Eurogroup -- a meeting of eurozone finance ministers -- convened in Luxembourg to give the green light to the European Stability Mechanism, the 17-nation currency bloc's permanent bailout fund.
Spain is expected to be the first country to make a request for financial aid from the ESM.
CNN's Elinda Labropoulou, Laura Smith-Spark, Diana Magnay and Sarah Brown contributed to this report.