Bobby Ryan recorded a hat trick in his first game in more than three months, leading the Ottawa Senators to a 5-2 win over the Vancouver Canucks on Thursday night.

Ryan entered the joint NHL/NHLPA assistance program on Nov. 20 after admitting to having a problem with alcohol. He last played on Nov. 16 in Buffalo, but had been skating on his own since late December.

Fans were quick to cheer Ryan on Thursday, giving him a standing ovation and chanting his name.

Vancouver Canucks center J.T. Miller (9) shields the puck away from Ottawa Senators left wing Nick Paul (13) during first-period NHL hockey action in Ottawa, Ontario, Thursday, Feb. 27, 2020. (Fred ChartrandThe Canadian Press via AP)

Vancouver Canucks center J.T. Miller (9) shields the puck away from Ottawa Senators left wing Nick Paul (13) during first-period NHL hockey action in Ottawa, Ontario, Thursday, Feb. 27, 2020. (Fred ChartrandThe Canadian Press via AP)

Connor Brown and Rudolfs Balcers also scored as Ottawa snapped a four-game winless streak. Marcus Hogberg made 32 saves.

J.T. Miller and Tyler Toffoli scored for the Canucks. Thatcher Demko stopped 21 shots.

Vancouver missed out on an opportunity to gain ground in the Pacific Division as they played game two of a four-game trip (1-1-0).

Vancouver Canucks right wing Tyler Toffoli (73) screens Ottawa Senators goaltender Marcus Hogberg (35) during first-period NHL hockey action in Ottawa, Ontario, Thursday, Feb. 27, 2020. (Fred ChartrandThe Canadian Press via AP)

Vancouver Canucks right wing Tyler Toffoli (73) screens Ottawa Senators goaltender Marcus Hogberg (35) during first-period NHL hockey action in Ottawa, Ontario, Thursday, Feb. 27, 2020. (Fred ChartrandThe Canadian Press via AP)

Leading 2-1 at the start of the third period, the Senators regained their two-goal lead just 14 seconds in as Ottawa won the opening faceoff and took control offensively.

Balcers scored when he picked up a Chris Tierney rebound. Brown hit the 40-point mark (14 goals and 26 assists) for the first time in his career with an assist on the play.

The Canucks made it a one-goal game as Toffoli tipped Miller's point shot midway through the period, but Ryan scored his second of the game with just over two minutes remaining and then added an empty-net goal to complete the hat trick.

Ottawa Senators defenseman Nikita Zaitsev (22) and Vancouver Canucks right wing Jake Virtanen (18) battle for the puck during first-period NHL hockey action in Ottawa, Ontario, Thursday, Feb. 27, 2020. (Fred ChartrandThe Canadian Press via AP)

Ottawa Senators defenseman Nikita Zaitsev (22) and Vancouver Canucks right wing Jake Virtanen (18) battle for the puck during first-period NHL hockey action in Ottawa, Ontario, Thursday, Feb. 27, 2020. (Fred ChartrandThe Canadian Press via AP)

Hogberg was solid through the second period, but the Canucks finally found a way to beat him with 15 seconds remaining in the period to make it 2-1.

The Hogberg robbed Vancouver numerous times through the period, including a point-blank save on Jay Beagle, but was unable to stop Miller's point shot.

For the second straight game, the Canucks gave up the first two goals as the Senators scored twice in a span of 31 seconds.

Ottawa Senators right wing Connor Brown (28) and Vancouver Canucks defenseman Quinn Hughes (43) battle for the puck during second-period NHL hockey game action in Ottawa, Ontario, Thursday, Feb. 27, 2020. (Fred ChartrandThe Canadian Press via AP)

Ottawa Senators right wing Connor Brown (28) and Vancouver Canucks defenseman Quinn Hughes (43) battle for the puck during second-period NHL hockey game action in Ottawa, Ontario, Thursday, Feb. 27, 2020. (Fred ChartrandThe Canadian Press via AP)

Brown opened the scoring as he took the puck at center and beat Demko with a wrist shot. Seconds later, Ryan made it 2-0 with his first since the opening game of the season.

NOTES: Ottawa's Colin White and Anthony Duclair missed their second straight game due to injury. ... Vancouver's Jordie Benn and Zack MacEwen were a healthy scratch.

UP NEXT

Canucks: At Toronto Maple Leafs on Saturday.

Senators: Host Detroit Red Wings on Saturday.

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