The National Hockey League, which will celebrate its 100th Anniversary in 2017, has scored a crucial win: moving to One Manhattan West around 2020, depending on when the building is completed.

The victory included a nifty hat trick: offices, a retail store and an NHL-branded public skating rink, all under a 20-year lease with two, five-year options. No financial terms were released.

For offices, the league will have 160,000 square feet on five floors in the 2.1 million square-foot office tower now under construction at Ninth Avenue and W. 33rd Street.

“Of course it will have lots of branding,” said Craig Harnett, the NHL’s senior executive vice president and financial officer of both the offices and store.

Its new retail store, at 15,000 square feet, will be twice as large as the current one in the base of 1185 Sixth Ave.

The next-gen store will likely be full of the latest in tech and experiences to get customers through the gates.

Its present, 133,000 square feet of hockey-themed offices are upstairs in the same building.

Developer Brookfield Property Partners plans to install a seasonal skating rink that sources said will be branded by the NHL.

Harnett said, “The goal is to be associated with that rink and have some branding. We’ll showcase hockey, showcase the NFL and it will be good for the plaza.”

Don’t be surprised to see NHL players at the rink from time to time, and perhaps even during an event or three.

It is just one long block to the current Madison Square Garden where the Rangers have their home ice.

NHL Commissioner Gary Bettman said, “The growth and momentum of our game and our business require a state-of-the-art facility; with its terrific amenities, including an NHL store, our new building will be that — and more.”

Believe it or not, it is not yet known what five floors of the 67-story tower the league will inhabit.

Sources said the league agreed to be within a range of floors in case Brookfield snares a heftier tenant that needs a larger block.

Skadden Arps previously agreed to move to 620,000 square feet in the middle of the building from its perch at 4 Times Square.

Manhattan West’s six buildings — including a nearly complete residential tower and hotel — will circle a public courtyard.

Its seven acres are bounded by Ninth and Tenth avenues and West 31st and West 33rd streets on the west end of Hudson Yards.

We first told you in November 2015 that the NHL was looking to move and the final deal took a yuge team to complete.

The NHL was repped by CBRE’s team of Michael Laginestra, Michael Geoghegan, Chris Corrinet, a former NHL player with the Washington Capitals, and Zach Weil. Brookfield was led in-house by Jerry Larkin, Duncan McCuaig, Kathleen Kane, Michael Goldban, Mark Kostic and Matt McCandless, and represented by Cushman & Wakefield’s Bruce Mosler, Josh Kuriloff, Robert Lowe, Mikael Nahmias and Ethan Silverstein.