BERLIN | Youssef Bassal’s heart swelled with pride when he draped an enormous German flag on the building where he runs a cell-phone store in support of the World Cup team.

So the Lebanese immigrant was stunned when German leftist groups tore down the 1,000-square-foot flag — not just once, but twice.

“I don’t understand them at all — every American or Frenchman would be proud to show their flag and root for their football team,” the 39-year-old said at his store in a neighborhood that’s home to many Arab immigrants.

“It’s not like there’s still a swastika on Germany’s flag.”

It’s a paradox rooted in Europe’s multicultural world: Immigrants have rallied around Germany’s diverse soccer team that includes players with roots in Turkey, Ghana, Poland, Tunisia, and other countries.

But 65 years after the end of World War II, some Germans are still adamantly against any expression of national pride and feel uneasy about cheering “Deutschland, Deutschland” during a World Cup match.

Of course there are millions of Germans, especially from the younger generation, who don’t hesitate to paint their faces with the German tricolor on game day. But strikingly, such overt expressions of national pride only appeared widely in the country when it hosted the World Cup four years ago.

At this World Cup, what caught the eye is that Berlin’s immigrant neighborhoods like Neukoelln, Wedding or Kreuzberg have sported many more black-red-golden flags on cars, balconies and storefronts than more traditionally German quarters like Mitte or Prenzlauer Berg.

That’s largely because this year’s team — a bit like the spectacular French squad that won the World Cup in 1998 — has seemed like a celebration of the nation’s multiethnic modern-day makeup. The team of 23 includes 11 players with a variety of immigrant roots.

It all reflects the country’s transition over the last decades from a largely homogeneous German nation to one where 15 million out of 82 million inhabitants claim immigrant background.

“These players, who are the children of former guest workers and binational parents … represent Germany in South Africa on the world’s stage,” Cem Ozdemir, co-leader of the Green Party and the son of Turkish immigrants, told daily Die Welt.

German Chancellor Angela Merkel lauded the German team’s diversity and called it “a role model for the integration” of foreigners, who have often been blamed by mainstream society of living their lives in an isolated “parallel society.”

While the entire nation has rallied behind the World Cup team, relations between immigrants and Germans are not always easy.

Last week, a low-level politician in Mrs. Merkel’s conservative Christian Democratic party suggested an intelligence test for prospective newcomers to assure that they “really benefit our country.” The idea was quickly shot down.

While many immigrants complain about racist remarks and xenophobic behavior, many Germans fear terrorist attacks by homegrown terrorists, especially Muslim extremists, after a handful of failed attempts.

To further complicate things, the legacy of the Holocaust still looms large — even when it comes to sporting events.

Heide Schwartz, a 58-year-old German teacher from Berlin, said even though she liked watching some of the World Cup games with her family, she would never adorn her car with a flag, because “Germany did too many horrible things during the Third Reich to be able cheer out loud for this country.”

The German radical leftist group “Autonome WM-Gruppe” went a step further and published a post on the Internet calling for the destruction of Mr. Bassal’s flag.

Mr. Bassal, who moved to Germany 25 years ago, responded to the online threats by organizing a group of five immigrants from Turkey, Egypt and Lebanon to protect the German flag at night. He also has pressed charges against those believed responsible for tearing it down the first time, who were caught by police.

“This flag has nothing to do with politics,” Mr. Bassal said. “It’s about celebrating our great German team, which is half immigrant anyway.”

Indeed, while the team has players like Thomas Mueller and Bastian Schweinsteiger with deep German roots, it also has Sami Khedira, whose father is Tunisian; Polish-born Miroslav Klose and Lukas Podolski; Ghanian-rooted Jerome Boateng; and Mesut Oezil, whose parents are Turkish.

“Our team is a successful mix,” Mr. Khedira told the Sueddeutsche Zeitung’s Jetzt magazine in a recent interview. “We are playing with this typical Mediterranean ease, but also have a very strong discipline when it comes to the defense.”

So far, the scores on the field have proven him right. Germany has advanced to the semifinals and will play Spain on Wednesday. The team has delighted soccer fans around the globe with its young, creative team.