A recent survey suggested more than 30% of people believed the country was "overrun by foreigners".

The study - by the Friedrich Ebert Foundation think-tank - also showed that roughly the same number thought that some 16 million of Germany's immigrants or people with foreign origins had come to the country for its social benefits.Foreign workers

Mrs Merkel told a gathering of younger members of her conservative Christian Democratic Union (CDU) party on Saturday that at "the beginning of the 60s our country called the foreign workers to come to Germany and now they live in our country."

She added: "We kidded ourselves a while, we said: 'They won't stay, sometime they will be gone', but this isn't reality."Continue reading the main storyAnalysisStephen Evans BBC News, Berlin

Angela Merkel took pains to say immigrants are welcome.

The words "utterly failed" are very strong, but there are also nuanced messages about the usefulness of immigrants in a country that needs skilled labour.

She is pitching it very carefully, with important elections coming up in the spring.

The tone is very important.

The chancellor is basically saying that Germany needs immigrants but immigrants need to do something to get into the society.

"And of course, the approach [to build] a multicultural [society] and to live side-by-side and to enjoy each other... has failed, utterly failed."

In her speech in Potsdam, however, the chancellor made clear that immigrants were welcome in Germany.

She specifically referred to recent comments by German President Christian Wulff who said that Islam was "part of Germany", like Christianity and Judaism.

Mrs Merkel said: "We should not be a country either which gives the impression to the outside world that those who don't speak German immediately or who were not raised speaking German are not welcome here."Mounting debate

There has been intense debate about multiculturalism in Germany in recent months.

Correspondents say Mrs Merkel faces pressure from within her CDU and its allies to take a tougher stance and require immigrants to do more to adapt to German society.

Earlier this week, Horst Seehofer, the leader of the CDU's Bavarian sister party, the CSU, said it was "obvious that immigrants from different cultures like Turkey and Arab countries, all in all, find it harder" to integrate.Muslims read Koran in Hamburg, file pic Mrs Merkel says Islam is part of Germany but more must be done on integration

"'Multikulti' is dead," Mr Seehofer said.

Earlier this month the chancellor held talks with Turkish Prime Minister Recep Tayyip Erdogan, in which the two leaders pledged to do more to improve the often poor integration record of Germany's estimated 2.5 million-strong Turkish community.

The debate first heated up in August when Thilo Sarrazin, a senior official at Germany's central bank, said that "no immigrant group other than Muslims is so strongly connected with claims on the welfare state and crime". Mr Sarrazin has since resigned.

Such recent strong anti-immigration feelings from mainstream politicians come amid an anger in Germany about high unemployment, even if the economy is growing faster than those of its rivals, our correspondent says.

He adds that there also seems to be a new strident tone in the country, perhaps leading to less reticence about no-go-areas of the past.