NHL players are set to return to the Olympics in Beijing this winter after reaching an agreement with international officials.

The league, its players' union, the International Olympic Committee and the International Ice Hockey Federation struck a deal Friday that will put the best players in the world back on sports' biggest stage in February after they skipped the 2018 Pyeongchang Games.

Even after the NHL and players agreed to Olympic participation as part of a long-term extension of the collective bargaining agreement last summer, the coronavirus pandemic and related costs threatened to shelve that possibility. Instead, the sides were able to figure it out, allowing for the league or players to withdraw if virus circumstances change for the worse or there's an outbreak during the season.

As long as that does not happen, NHL players will compete in the Olympic men's hockey tournament for the sixth time in seven chances dating to 1998.

U.S. coach Mike Sullivan called returning to the Olympics "such an exciting time for hockey.”

He is not alone in that thinking.

Reigning NHL MVP Connor McDavid played for an under-23 “Team North America” at the 2016 World Cup of Hockey and has yet to play for Canada in a tournament of the world's best men's hockey players.

"Just to be able to represent Canada at the Olympics and compete for a gold medal would be an absolute dream come true," McDavid told The Associated Press this week. “It’s kind of been a long time since we’ve been able to play best-on-best internationally. I think for me and I think for a lot of guys that were on that team, it’s been a long time coming. We’re obviously looking forward to going to the Olympics if we’re all lucky enough to make it.”

It could be the first Olympics for McDavid, U.S. star Auston Matthews, 2020 playoff MVP, two-time Stanley Cup champion Victor Hedman and many others. They didn't get the opportunity three years ago, when national teams were made up mostly of college and European professional players, except for the Olympic Athletes from Russia, who won the gold medal in Pyeongchang.

“The Olympics is one of the biggest dreams of mine and I haven’t been able to participate in one — this might be the last chance I get,” said Hedman, who was left off Sweden's 2014 Olympic roster. "When you get an opportunity to represent your country on the biggest stage, it is one of those things that you’ll probably never forget, so yeah for me it is obviously something that I’ve been dreaming about my whole life and something I want to do before I hang up my skates.”

As recently as the Stanley Cup final, NHL Commissioner Gary Bettman and Deputy Commissioner Bill Daly raised doubts about reaching an Olympic agreement. Bettman said on June 28 that it's becoming a “rather short time frame” to get things squared away, less than eight months before the Beijing opening ceremony.

The NHL will hold All-Star Weekend in Las Vegas on Feb. 4-5 before players fly to China on Feb. 6 for the Olympics that open Feb. 9. It is similar to the 1998 Nagano Games when the All-Star festivities in Vancouver led into the first Olympics with NHL players.

“It levels the playing field,” said Hall of Fame defenseman Chris Pronger, who made his Olympic debut in 1998 and won gold with Canada in 2010. “It allows more countries to compete at a higher level. It showcases the sport."

NHL players at the Olympics became commonplace in the years after that, with the IOC agreeing to pay travel and insurance costs and owners willing to pause the season for players to take part in the tournament. An entire generation of players grew up knowing of Olympics being a showcase for NHL stars.

“You have a dream of representing your country,” said U.S. defenseman Ryan McDonagh of the Lightning. “The Olympic Games are such a unique experience, and I think they do wonders for the sport of hockey.”

The IOC under President Thomas Bach would not pay assorted costs in 2018, leading the NHL to turn away from the Olympics and league officials expressing their concerns about interrupting the season. But the CBA extension put Olympic participation back on the rails, and USA Hockey and Hockey Canada chose NHL general managers and coaches in anticipation that a deal would be reached.

Players ultimately decided it was worth handling any virus restrictions in Beijing, which could go above and beyond the quarantined bubbles of the 2020 playoffs.

“I don't think there'll be anything there that we haven't seen before,” Canada coach Jon Cooper said. “I do take comfort in the fact that we’ve been through all these different situations.”

___

More AP NHL: https://apnews.com/hub/NHL and https://twitter.com/AP_Sports