The Rangers rewarded Jeff Gorton’s handling of the team’s rebuild.

The Blueshirts extended their general manager along with assistant GM Chris Drury, The Post’s Larry Brooks confirmed. Hockey Night in Canada’s Elliotte Friedman first reported the new deals.

Gorton, who joined the Rangers in 2007 as a scout, has been the Rangers GM since 2015 after taking over for Glen Sather and is currently working under team president John Davidson. Entering Sunday, the Rangers sat three points out of a wild-card playoff spot in the Eastern Conference. That comes just two seasons after the team sent a letter to its fans asking for patience as it rebuilt a roster after an extended period of success, including a loss in the Stanley Cup Final in 2013-14.

The contract extensions likely also keep Drury off the market as a potential candidate as other franchises look for a general manager this summer.

Gorton’s most recent big move was reaching a contract extension with Chris Kreider right before the trade deadline, a seven-year deal worth $6.5 million per season.