Correction: An earlier version of this article misspelled the name of the Italian newspaper La Repubblica. This version has been corrected.

fifty-five minutes into the soccer game, with Germany owning the ball and Greece seeming doomed to lose, a kind of miracle happened: striker Giorgios Samaras scored to tie the match.

In an open-air bar in the central part of the city, the entire room seemed to stand up at once, wrapping themselves with Greek flags, jumping up and down in a sort of victory dance and shouting for joy. But instead of focusing on the athleticism of the shot, how a team that seemed so outclassed could somehow take back the game in a few seconds, the reaction was about something entirely different: the euro crisis.

“Take that, Germany!” shouted one man.

“I want to see Merkel’s face now!” said another, referring to German Chancellor Angela Merkel.

For 90 minutes on Friday, the European financial crisis played out on a 105-by-68-meter patch of grass in Gdansk, Poland.

The contest — a quarterfinal match in the European Championship viewed live by tens of millions soccer fans across the continent — pitted debt-
hobbled and twice-bailed-out Greece against Germany, the richest country in the euro zone. It was German leaders who have been most vocal in demanding that Greece slash spending in return for emergency aid. Germany has anted up $600 billion to help keep the currency union from falling apart. But for many Greeks, Germany is the author of their economic misery.

Although soccer matches have long been a venue for fans to vent national rivalries, Friday’s game was special. For many Europeans, the Greece-Germany soccer game was the physical representation of a problem — the debt crisis on their continent — that many people understand only in broad outlines but that is affecting their everyday lives, from their ability to get jobs to the taxes they pay.

The appeal of viewing the game from this perspective, fans explained, is its simplicity. Two teams. One ball. Fixed rules.

In Germany, an editorial in the Frankfurter Allgemeine Zeitung newspaper on Friday explained that the recent twists in the debate over possible remedies to save the euro zone have become so incomprehensible to ordinary people that “many millions of Europeans prefer to reduce the complexity and let the ball decide.”

In the days before the game, media outlets in both countries sought to play up the rivalry. In Germany, Bild, the country’s ­largest-circulation paper, goaded Greek fans: “No bailout fund can save you.” The Frankfurter Rundschau called the match “a pressure cooker of national feelings.”

The Greek media seemed to be responding directly to the Germans with headlines such as “Bring it on.”

Other Europeans have been taking jabs at both teams — cartoonists depicted Greek players in shirts with logos of German companies — but Germany has taken the brunt of the jokes.

As recently as a few weeks ago, Greece was Europe’s problem child. It had mismanaged its finances, racking up debts so massive that they threaten to unravel the euro zone. But the narrative has been changing and alliances have been shifting as more and more countries have been pulled into the crisis.

It is now Germany and Merkel, who wrapped up a summit meeting in Rome early so that she could attend the game and cheer for her team, who are in the crosshairs. European media outlets have increasingly portrayed Merkel as the obstacle to stability in the euro zone because of her opposition to proposals for issuing eurobonds jointly backed by all the region’s governments and setting up a Europe-wide bank deposit guarantee system. She has argued against these and other measures that could increase the financial burden on Germany, saying the country’s resources are not “infinite.”

In an online poll by the Italian newspaper La Repubblica, the great majority of Italians — 68 percent — said they were eager to see Greece win, while only 27 percent were for Germany.

There was such intense interest by Germans that in Berlin about 500,000 soccer fans gathered around the iconic Brandenburg Gate and in other public venues on Friday night to watch the game.

But several German spectators confessed that they were baffled by the extent of the anger some Greeks directed at them.

“This is nonsense,” said Thomas Knabe, who was at a beer garden near the university in western Berlin with about 1,000 others. “It is not us who are responsible for the debts of Greece.”

Hildegard Aglassiner, 61, an office employee, said she has no animosity toward the Greeks: “We really wish them luck in their economic success. But not in sports. If they are playing the better game, they should win. If not, they shouldn’t.”

In Athens, the game was all about pride.

Men and women dressed in blue shirts the color of the Greek flag and in the jerseys of their national team spilled on to streets lit up by flat-screen TVs that had been erected outside. Commerce came to a standstill as tens of thousands watched the game together.

In one cafe in the working-class section of Patisia, which has been hit especially hard by the crisis, the crowd — made up of adults of all ages — was mostly silent as it watched Germany’s players take shot after shot at the goal.

Alas, after Samaras’s goal, the match remained tied for a mere six minutes, until Germany's Sami Khedira volleyed a cross from the right side into the net.

When the TV cameras flashed to Merkel cheering, the fans raised their arms above their heads, shook them and shouted “Ahhhhh” — the Greek equivalent of booing.

“German politics are responsible for the situation we are in,” said Panos Papadopoulos, 26, an unemployed writer.

His friend, Georgios Chrisafis, 30, who used to work on a boat before he, too, lost his job, nodded. “Merkel is probably the most hated person in Europe.”

The reaction 1,200 miles to the northeast in Berlin to the same images was the opposite: As Merkel rose from her seat in slow motion, throwing her arms into the air, the crowd was jubilant.

Greece lost 4-2, but, as one spectator in Athens put it, it was a defeat with dignity.

“They did our country proud. In this small way, we punched above our weight,” said Paulos Zafiropoulos, 30, who worked for an environmental TV show before he was laid off in February.

In the end, much of the animosity seemed to evaporate when the players walked off the field. Friday night’s game had been about hyperbole, and even the people making the provocative comments said they knew this.

“We shouted at them because it was fun,” said Sofia Frageskarou, 52, in Athens. “We know this isn’t going to make a difference with the crisis. We know it’s just a game.”

Krischok, a special correspondent, reported from Berlin.