Denmark goalkeeper Kasper Schmeichel had heard the words echo through Copenhagen’s Parken Stadium countless times over his decade-long international career: “We are red. We are white. We stand together side by side.”

But as the Danes closed out a 4-1 win over Russia on Monday to secure a place in the European Championship knockout round — against the odds, in the wake of unthinkable hardship — Schmeichel contemplated that message of unity on a deeper level.

“That’s what we do,” Schmeichel said in an interview Wednesday. “That’s what we did. That’s our identity.”

Nine days earlier, on the same field, Denmark midfielder Christian Eriksen went into cardiac arrest and collapsed during the team’s Euro 2020 opener against Finland. Denmark’s shellshocked players formed a shield around Eriksen for privacy as medical staff worked and spectators and broadcast viewers collectively held their breath. A team doctor would later say Eriksen was “gone” before a defibrillator resuscitated him on the field.

With Eriksen recovering from home, Denmark entered the match against Russia with a pair of losses and long-shot hopes of moving on. By the time defender Joakim Maehle iced the result with an 82nd-minute strike, emphatically tugged at the Danish badge on his jersey and bolted toward the same corner of grass where Eriksen was lost and brought back, it was clear that Denmark’s competitive spark — understandably dulled by the ordeal the team endured — was lit anew.

“The motivation, the team spirit, the friendship among the players was amazing,” Denmark Coach Kasper Hjulmand said during his postgame news conference. “We played three games on a very high level, and if someone deserves this, it’s our players. I can’t imagine how they managed to come back from what they went through.”

Paired with Belgium’s 2-0 victory against Finland, the result put Denmark, Russia and Finland level on three points apiece, with the Danes advancing as the group runner-up on the goal differential tiebreaker. On Saturday, Denmark will open the round of 16 with a match against Wales in Amsterdam.

Denmark entered the European Championship as a dark-horse contender, featuring a veteran lineup peppered with regulars from top European clubs and Inter Milan playmaker Eriksen pulling the strings. After failing to qualify for Euro 2016, the Danes progressed to the round of 16 at the 2018 World Cup — in which they fell to eventual runner-up Croatia on penalties — then went undefeated in Euro 2020 qualifying.

But nothing could have prepared Denmark for Eriksen’s collapse, which occurred late in the first half against Finland. Danish captain Simon Kjaer immediately identified the urgency, rushing to Eriksen’s aid until the medics arrived. When the match resumed nearly two hours later — a decision Denmark later questioned — Danish players could be seen shedding tears as they warmed up.

“A lot of times, you hear people talk about great team spirit and all these kinds of things,” Schmeichel said. “But when, for want of a better expression, the s--- hits the fan, then you really see what people are made of and what the team’s made of. And I think we’ve been tested these last 14 days more than would be possible — and probably worse — than in our worst nightmares.”

The stunned Danes lost to Finland, 1-0, despite dominating the contest, then performed admirably five days later in a 2-1 defeat to top-ranked Belgium.

The news of Eriksen’s gradual recovery lifted the team’s spirits, but Kjaer, Schmeichel and the rest of Denmark’s leadership were careful not to downplay the mental health concerns that lingered. Some players needed time and space to process their emotions. Others sought the escape that came with getting right back on the training field. In a group of disparate personalities, compassion was the commonality.

“No matter how you twist or turn it, the experience that we went through together was very, very rough and very traumatizing,” Schmeichel said. “To see your friend like that is going to have an impact on everybody. And I think the role of the leaders in the group is to make sure that everybody feels like it’s a safe space, they can be heard and there’s not, like, a wrong feeling. . . . There’s nothing wrong with smiling. There’s nothing wrong with laughing. There’s nothing wrong with crying. It is what it is, and people react in different ways.”

The day after Denmark lost to Belgium, the squad got a surprise: Eriksen, now fitted with an implantable cardioverter defibrillator, visited Denmark’s practice outside Copenhagen shortly after being released from the hospital. Just seeing Eriksen out and about, laughing and smiling, imbued Denmark’s players with a sense that they could finally refocus on the field, Schmeichel recalled.

“It was emotional because the last time we saw him, he was lying there on the field being saved,” Maehle told reporters. “We knew that Christian was okay, but it’s completely different to see him in real life.”

Although Eriksen’s attacking prowess is integral to Denmark, the team’s group-stage performances showed a squad that remains defensively stingy and, at times, ruthlessly direct going forward. And the knockout round draw was somewhat forgiving: Instead of facing a group winner, Denmark will meet fellow runner-up Wales, which went 1-1-1 in the group stage and, at No. 17, sits seven slots behind the Danes in the world rankings. Denmark famously failed to qualify for Euro 92, then won the whole thing as a late replacement for war-torn Yugoslavia; belief in the unlikely is ingrained in Danish soccer culture.

While Eriksen can’t take the field, he remains in “constant contact” with his teammates, said Schmeichel, who called him a “massive” part of the team.

“He can’t be here right now. He needs to rest, he needs time, he needs to recuperate, and his family needs time on top of what’s happened,” Schmeichel said. “But he’s still one of our leaders, he’s still in our leadership group, and right now he just needs to take care of himself — and we’ll take care of the rest.”