The Islanders had felt good about their preceding solid performances.

Winning feels better.

“You can’t keep coming in here and saying, ‘Oh, we played a great game,’ and we’re still losing,” Anders Lee said. “It’s nice we don’t have to say that tonight. There wasn’t much going on tonight. It was one of those games where it just kind of felt like it was meh.”

The Islanders snapped a three-game losing streak with a 2-1 win over the Lightning, who had their seven-game winning streak snapped, on Tuesday night at UBS Arena.

It was the penultimate match of a seven-game homestand that had started 1-3-1 with the Islanders totaling six goals despite goaltending and defensive efforts good enough to win.

The Islanders (14-10-3) got those again, with Ilya Sorokin’s 29 saves backstopping an effort that included a 3-for-3 penalty kill in his first home victory since Oct. 21.

“It’s funny how hockey is because I thought we played really, really well the first five games of the homestand,” coach Patrick Roy said. “I don’t think we played bad [tonight] but we didn’t play as well as the other games and we came up with the win.”

And that happened after a frantic final stretch with the Atlantic Division-leading Lightning (16-8-2) — who outscored opponents 30-10 in their winning streak — skating six-on-five with Andrei Vasilevskiy (21 saves) off for an extra skater. Defenseman Adam Pelech was on the ice for 2:57 of the last 3:34, defenseman Ryan Pulock played the last 2:16, Simon Holmstrom played the final 2:30, Bo Horvat was on the ice for 2:17 of the last 2:33 and Emil Heineman played the final 2:34.

“I think our fans deserve the win,” said Sorokin, whose shutout bid ended when fourth-liner Dominic James banked a sharp-angle shot from the right off the goalie and inside the near post at 16:26 of the third period. “We want to feel some emotion in this building. It was a big two points for us.

“It was tough the last three minutes. My guys played outstanding.”

Anthony Duclair, with his first goal in 14 games off rookie Cal Ritchie’s backhand feed at 5:30 of the third period, gave the Islanders their first two-goal lead since a 5-0 win in Detroit on Nov. 20 that ended a 6-1-0 road trip.

It capped a strong night for Ritchie’s third line that also includes Holmstrom. Casey Cizikas’ fourth line with Kyle MacLean and Max Tsyplakov also was tenacious in pushing the puck up ice and helping the effort to shut down the Lightning.

It was a crucial task holding the Lightning’s top trio of Anthony Cirelli between Brandon Hagel and Nikita Kucherov without a point. Hagel entered the match with eight goals and four assists in a five-game point streak while Kucherov had four goals and 14 assists in a nine-game point streak.

“A lot of offense on that side,” said Bo Horvat, who collected his own rebound in the slot for a 1-0 lead 55 seconds into the second period as the Islanders’ leading scorer notched his second goal in two games after a four-game drought without a point.

“We stuck to our game plan and finally got rewarded for the way we’ve been playing. Only scoring two, you’ve got to defend well and your goaltender has got to play great and he did tonight.”

It was the first of three games between the teams in 12 days and first-year Islanders general manager Mathieu Darche’s first win over his former employer after serving as the assistant to Lightning GM Julien BriseBois.

Notes & quotes: Jean-Gabriel Pageau (upper body) participated in the morning skate wearing a non-contact jersey, his first time on ice with his Islanders’ teammates since getting hurt in a 2-1 loss to the Blues on Nov. 22 to start the homestand. Pageau said he resumed skating “three, four days ago.” Darche said last week he expected the center to miss two to three weeks, adding Pageau would be back in the lineup before Christmas. “I’ve always had the tendency to come back quick after injuries,” Pageau said. “I want to make sure I do it right.” . . . Defenseman Adam Boqvist and forward Marc Gatcomb were the healthy scratches . . . Defenseman Tony DeAngelo had an assist in 16:40 after being a game-time decision because of illness.

Andrew Gross

Andrew Gross joined Newsday in 2018 to cover the Islanders. He began reporting on the NHL in 2003 and has previously covered the Rangers and Devils. Other assignments have included the Jets, St. John’s and MLB.