The Maple Leafs had plenty of time to ponder their disastrous California road trip.

A long flight, a day away from the rink, meetings and a practice all came on the heels of Toronto — in the midst of a fight for its playoff life — grabbing a solitary point and scoring a measly trio of goals against the Western Conference's three bottom-feeders.

The response early against one of the NHL's top teams was impressive on Tuesday.

And after the Tampa Bay Lightning inevitably pushed back, the Leafs showed a level of commitment that's been lacking far too often during this roller-coaster 2019-20 season.

Auston Matthews scored his 47th goal of the campaign early in the third period and Frederik Andersen made 32 saves as Toronto picked up a crucial 2-1 victory over Tampa to snap an ugly three-game slide.

William Nylander also scored for the Leafs (36-25-9), who lost to 5-2 to San Jose, 1-0 in a shootout to Los Angeles Kings and 2-1 at Anaheim in the space of four days last week.

WATCH | Maple Leafs get back on track at home:

Toronto defenseman Morgan Rielly returned to the ice after being sidelined with a broken foot. His group defeated Tampa Bay 2-1 at home. 1:30

Mitch Marner and John Tavares put up two assists each for Toronto, which had star defenceman Morgan Rielly back in the lineup for the first time since breaking his foot on Jan. 12.

Ondrej Palat replied for the Lightning (43-21-6), who got 34 stops from Andrei Vasilevskiy.

With the victory, the Leafs moved three points ahead of the Florida Panthers for the third and final playoff spot in the Atlantic Division. Florida has one game in hand.

"We've talked about being more consistent and now more than ever, just given the standings, the time of year and remaining games, it's an opportunity for us to start to play well and build some momentum," said Rielly, who missed 23 games due to injury. "If you look back to this time last year our performances weren't what we wanted them to be in time for playoffs ... this year we've got a chance to fix that and change that.

"It's important that we take that seriously."

Leafs' early onslaught

With new/old line combinations in its top-6 forward group — Matthews was back with Nylander, while Marner and Tavares were reunited — Toronto was fired out of a cannon early, buzzing Vasilevskiy with 18 shot attempts compared to zero against through the game's first 11 minutes.

The problem was, nothing was getting through.

"You have lots of time to reflect," Matthews, just one goal back of Alex Ovechkin and David Pastrnak for the NHL lead, said of the time between Friday's loss in Anaheim and Tuesday's response. "Our first period is a good starting point for us and how we want to play. We've got to make sure we do that more consistently and throughout the game."

Lightning head coach Jon Cooper had a different view of the opening period, stating bluntly the only thing missing was "effort" from his team.

"It was disappointing," he said. "During the course of a year ... it's 82 games, three periods a game, it's a lot of periods of hockey. For the most part, we have a lot of good ones. There's a small amount that we could have been better, and then there's a couple that have been embarrassing.

"That would fall in the embarrassing [category]."

But after Tampa battled back to tie things 1-1 through 40 minutes, Matthews connected for Toronto's second power-play goal of the night when he took a backdoor feed from Marner down low at 3:38 of the third period.

The Leafs entered Tuesday on a 0-for-14 run with the man advantage, but finished 2 for 5 after also connecting twice on four opportunities in a 4-3 victory at Tampa on Feb. 25. Toronto's penalty kill was equally solid Tuesday, keeping the Lightning off the board on their four attempts.

The visitors pressed late in the final period, but Andersen was there to close the door, including a big stop on Kevin Shattenkirk from the slot, to secure a much-needed Leafs' win.

"He was great," Rielly said of his netminder. "He really held us in there."

Tampa now sits eight points back of Boston for first in the NHL's overall standings and the Atlantic after also getting stunned 5-4 in a shootout by last-place Detroit on Sunday.

Virus precautions

With the NHL joining the NBA, MLB and MLS in restricting access to locker rooms in hopes of reducing the risk of spreading coronavirus, the Leafs and Lightning held their pre- and post-game availabilities with reporters in separate media centres at Scotiabank Arena.

Toronto also usually unfurls two massive flags during O Canada — the traditional Maple Leaf and one with the team's logo — for the crowd to pass across the lower bowl, but that practice has been shelved.

The Toronto Maple Leafs typically display two large flags during the national anthem(s), as seen above in a file photo from 2018, but due to concerns amid the coronavirus outbreak, the tradition was scrapped prior to Tuesday's game. (Frank Gunn/The Canadian Press)

There appeared to be more empty seats than usual for the game, especially one involving two of the league's highest-scoring teams, and fans were advised before puck drop and at the end of every period on ways to prevent the spread of coronavirus.

Down 1-0 after a first that could have seen Toronto up by three or four, the Lightning got even with 4:37 left in the second.

Brayden Point blew past Leafs defencemen Tyson Barrie and Rasmus Sandin before the puck fell to Nikita Kucherov. His initial shot was stopped, but Palat was there to bag his 17th on the rebound.

Making just his second start in the last 10 days, Andersen was terrific earlier in the period with saves on Carter Verhaeghe and Tyler Johnson on breakaways before snagging a one-timer off the stick of Mikhail Sergachev.

The Leafs came out with one of their best starts in recent memory, peppering Vasilevskiy on chance after chance — including a post from Pierre Engvall on a short-handed break — before Nylander finally got the home side on the board at 12:42 on a power play when he potted a rebound for his 31st.

Andersen had little to do at the other end until late in the period when the Lightning finally started to find their legs, making a couple nice saves before Palat clanked the iron on a shot that stayed out.

"We've talked a lot about our starts and consistency in our play," said Leafs head coach Sheldon Keefe, whose team hosts Nashville on Thursday. "We moved the puck extremely well. It was a game we just played with the puck on our stick a lot.

"That's when we're frustrating."

A stark contrast to last week, when all they did was frustrate their fans.