TORONTO — Auston Matthews checked his phone before his NHL debut and came across text messages from former teammates. It wasn’t exactly encouragement. The Toronto newcomer was in their fantasy hockey lineups.

“Hopefully, I did all right,” the 19-year-old said a day later.

Fantasy hockey owners would indeed be proud. Matthews became the first player in modern NHL history to score four goals in his debut , a 5-4 overtime loss at Ottawa on Wednesday night. He scored his fourth goal with 3 seconds to go in the second period.

“He’s going to have great nights down the road,” Maple Leafs defenseman Morgan Rielly said Thursday. “But this one will be one that he’ll remember for a long time.”

It took less than 10 minutes for Matthews, the first player picked No. 1 overall by the Leafs in 31 years, to find the back of the net.

The play started with two nifty dekes by 20-year-old William Nylander just inside the Ottawa zone. He danced around Senators defenseman Mark Borowiecki and then flung a pass into the middle for Matthews, his shot attempt squirting just wide of the goal. It was eventually claimed behind the net by Zach Hyman, the third member of Toronto’s all-rookie line.

“I tried to just pick it up and I saw Auston and I just threw it back in front and he was there,” Hyman recounted.

Matthews quickly fired a shot past Anderson steps outside the crease, Senators defender Chris Wideman just a second late in tying him up.

After Ottawa scored twice in less than 2 minutes, Matthews struck again on the most eye-catching goal of the evening.

Hyman took the action in from steps away like an astounded fan.

“There’s so many little things on that play that I think most guys can’t do and he did it all in one play,” the 24-year-old Hyman said. “The puck was in the net pretty quick.”

Matthews gained control of it in the neutral zone, slipping it through the legs of a helpless Mike Hoffman. He whirled into the offensive zone and lost control of the puck briefly, Senators captain Erik Karlsson temporarily taking hold of it along the boards. Undeterred, Matthews dodged a check from Hoffman and before Karlsson, a former Norris Trophy winner, had a chance to make a play, lifted his stick, swiped the puck back and attacked the crease.

Perhaps missed on first glance was the slight whack Matthews gave Karlsson on the left leg, an attempt to make the defenseman think he was coming from the left instead of the right. He then got a quick shot under Anderson’s glove seconds before Marc Methot could drop to the ice and break up the play.

“Just a couple puck battles,” Matthews said. “I think I was able to sneak by my check there and catch Karlsson off-guard and (then) was able to just pick the puck, go in and slide it 5-hole there.”

Watching it unfold Hyman thought: “He’s a good player.”

Matthews completed his hat trick 1:25 into the second period on his third shot of the game .

Rielly instigated the action, veering into the offensive zone with speed before he was steered into the left corner by Ottawa’s defense. He nonetheless managed to thread a pass through a sea of skates to Matthews, wide open in the right faceoff circle.

Rielly said he knew Matthews was there the whole time and was only able to get the pass through all that interference because of his teammate’s positioning.

“He changed his speed and he went into a good spot where I was able to get it to him,” Rielly said. “If he had just driven the net like most guys do I don’t think it would’ve worked. But he stopped up and he made his blade available and that’s what happened.”

Matthews’ fourth and fifth shot attempts were denied, but it was evident a fourth goal was coming and indeed it arrived in the waning moments of the second period.

With 9.7 seconds left and the score tied 3-3, Jake Gardiner lofted an outlet from the Toronto zone past a leaping Brassard. Matthews snatched it up near center ice, found Nylander and then took off to the front of the net. Nylander slid a pass just under the stick of Wideman, the only defenseman back for Ottawa.

“I just put it there and then he put it in,” Nylander said.

It was the finishing touch on history.

Matthews said he would give the four pucks from his debut to his mother, Ema.

“I think just playing in your first NHL game you know it’s going to be a special night,” said Matthews, already looking ahead to Toronto’s home opener against Boston on Saturday night. “Just going out and there and getting your first taste of the NHL and living your dream right there it’s pretty special.”