After five decades of heartbreak and anguish, of shootout defeats and unfulfilled dreams, England again will play for a major men’s soccer trophy.

The Three Lions on Wednesday took another step toward their first title since the 1966 World Cup, defeating Denmark, 2-1, in extra time at Wembley Stadium to advance to the European Championship final.

On Sunday, they will return to the famous venue in northwest London to face Italy, which advanced Tuesday with a penalty-kick triumph over Spain.

“They can see what it’s meant to the whole country and what it’s meant to the fans in the stadium,” said Coach Gareth Southgate, who guided England to the 2018 World Cup semifinals in Russia. “I’ve never known the new Wembley like this. Nights like tonight make it all worthwhile.”

England has not witnessed its national team in a major final since it won the World Cup at home 55 years ago — an eternity for a country that invented the modern game in the 19th century and boasts the sport’s most popular club circuit, the Premier League.

It will mark England’s first appearance in the Euro final in 10 attempts. (It lost in the semifinals twice.)

“We know we haven’t won nothing yet, but you have to enjoy winning,” said striker Harry Kane, who scored the winning goal on a rebound of his saved penalty kick in the 104th minute. “There is always that feeling in the back of your mind we’ve got one more to go, so you don’t want to get too carried away. … We’re obviously excited about a final on our home ground.”

The outcome ended an emotional ride for Denmark, a decided tournament underdog that, in its group opener last month in Copenhagen, watched in horror as star midfielder Christian Eriksen suffered a cardiac arrest on the field. His life was saved by teammates and medics.

The Danes lost their first two matches before winning three straight and getting within two victories of repeating their 1992 European crown.

“We needed the support. We needed the empathy when that happened with Christian,” Coach Kasper Hjulmand said. “We have received a lot of love and support. It was an amazing feeling. These guys are outstanding. The whole nation should be proud.”

The outcome was not without controversy. Although England was the better side in the second half and extra time, following a 1-1 draw through 45 minutes, the deciding goal came after referee Danny Makkelie awarded a questionable penalty kick.

England’s Raheem Sterling tumbled in the box after light contact, and following Makkelie’s ruling, video review upheld the call.

“I went into the box, and [Mathias Jensen] stuck his right leg out, and it touched my leg,” Sterling said. “It’s a clear penalty.”

Hjulmand disagreed, saying he was “disappointed we were so close to a final and it was decided that way. It shouldn’t have been a penalty. I’m annoyed.”

Southgate was sympathetic.

“If you were to say to me that the penalty was soft,” he said, “I can understand.”

Kane, who was denied a penalty claim in the second half, said “it probably evened itself out throughout the game.”

Kane’s attempt was not well taken, and Kasper Schmeichel made the save diving to his left. But the ball rebounded to Kane for an easy put-away. “Fortunate to see it bounce back,” Kane said.

England surfed the wave of emotion at Wembley and, for that matter, from a trophy-starved nation. Denmark, though, struck first, ending England’s string of seven consecutive shutouts, including five in this tournament.

With a free kick from more than 30 yards, 21-year-old Mikkel Damsgaard lifted the ball over England’s wall and beyond the reach of a leaping Jordan Pickford. It was undoubtedly a terrific strike, but Pickford probably should have at least gotten a firm hand on the ball.

The 8,000 red-clad Danish supporters in attendance erupted.

The goal was almost remarkable as the fact it was the first goal off a free kick in the entire tournament.

“There was no panic,” Kane said. “These games are about character. They’re about digging in. They’re about belief.”

After two quality opportunities, England had an answer.

Kane cracked open the Danish resistance with a through ball to Bukayo Saka penetrating the right side of the penalty area. Saka crossed into the six-yard box. Sterling was unmarked as he stormed the back side.

Danish captain Simon Kjaer intervened with a desperate, sliding effort, inadvertently tucking the ball into the net for an own goal.

Schmeichel prevented further damage early in the second half, making an extraordinary save on Harry Maguire’s header.

The match looked like England’s to win in regular time, but when pressure grew, the Danes did not crack.

With Denmark sitting back in extra time, England dominated possession and probed for an opening. After a dozen minutes, Sterling drew the controversial penalty, and Kane, after a misstep, put the hosts ahead.

Denmark still had more than 15 minutes to force a penalty-kick shootout, but exhaustion undermined its efforts. England — the team and the nation — celebrated.

Sunday brings the final hurdle.

“It’s going to be an amazing occasion, for sure,” Kane said. “It’s going to be a special day. We want it to be a special day for everyone.”

Read more on soccer:

Find highlights from England-Demark below.