SAN JOSE, Calif. -- Joe Pavelski is finding his first career hat trick to be elusive, but the San Jose Sharks' versatile center won't give up.
"It'll happen, I bet, hopefully," Pavelski said. "We'll see, I'll keep trying. That was one of the better looks I've had at it, though."
Pavelski logged his 22nd career two-goal game, barely missing the net with a final attempt at No. 3, as the Sharks beat the Detroit Red Wings 4-1 Thursday.
While Pavelski took the team lead with 21 goals -- 12 scored over the past 15 games -- goalie Antti Niemi stopped 24 of 25 shots, and San Jose's penalty kill went a perfect 4-for-4.
"We did some good things but weren't good enough here," Red Wings coach Mike Babcock said. "We have to find a way to be better."
The Sharks broke open a tie game after one period with a three-goal explosion in the second. Detroit goalie Jimmy Howard struggled, looking bad on the tiebreaking and fourth goals by the Sharks before getting replaced at the start of the third period by rookie backup Petr Mrazek.
"He played his best game the last time out, and tonight he had to be better," Babcock said of Howard.
After the teams exchanged failed power plays early in the second period, San Jose center Andrew Desjardins chipped a puck around Detroit defenseman Jakub Kindl at center, drove the left boards and surprised Howard with a low wrister from the far edge of the left circle at 9:44 to break a 1-1 tie.
"I guess I was going low blocker, it just found a little hole," said Desjardins, whose only other goal this season came on Oct. 27. "You don't want to be that far in between goals; it's just the way it goes sometimes. It feels good to get one."
Less than three minutes later, Pavelski struck, corralling the rebound of defenseman Brad Stuart's shot and lifting it behind Howard at 12:25.
"When the team really needs him, he elevates his game," Sharks coach Todd McLellan said of Pavelski. "That's the sign of a really good player."
After the Sharks killed a spirited Red Wings power play, right winger Tyler Kennedy drew an interference penalty on defenseman Kyle Quincey. Sharks defenseman Dan Boyle made the visitors pay with a power-play goal at 16:28 on a shot from the right circle that beat an out-of-position Howard.
"We weren't very focused in Nashville (on Tuesday), but tonight we got back on track and played a full 60," Sharks captain Joe Thornton said of the team rebounding from a 1-2 road trip to stay within nine points of the division-leading Anaheim Ducks.
The Sharks broke on top when Pavelski hit the back of the net for the fourth time in five games 4:59 into the opening period.
Thornton led a rush into the Detroit zone, pulled up in the left circle and spotted Pavelski in the opposite circle having gained a shooting angle with center Henrik Zetterberg defending. Thornton made a tape-to-tape pass, and Pavelski one-timed his 20th goal past Howard on the team's fourth shot of the game.
"They scored. We didn't," Zetterberg said of San Jose's top line. "Those are good players, and when you give them a couple of seconds, they produce. I think we forced things too much rather than getting the puck and staying in control."
Niemi was strong in the middle portion of the period, robbing right winger Dan Cleary on two shots in close at even strength.
The Sharks were unable to convert despite an effective mid-period power play, and the Wings took advantage shortly thereafter by drawing even.
Recognizing Marc-Edouard Vlasic lost his stick, Detroit left winger Tomas Tatar skated out front against the San Jose defender to the right of Niemi, and after a series of stick-handling moves, lifted a backhander over the goalie's glove into the far upper corner for his ninth goal at 16:48.
"We got back on our heels and they took over the game," Tatar said. "We didn't play that bad. We just let them score, and it's hard to win giving up four goals."
Howard stopped 19 of the 23 shots he faced. Mrazek saves all three San Jose shots in the final period.
NOTES: Sharks RW Tommy Wingels was activated off of injured reserve after missing five games due to an upper-body injury suffered Dec. 29. RW Freddie Hamilton was assigned to AHL Worcester. ... Sharks D Matt Tennyson was promoted from the team's affiliate in the AHL for insurance on the blue line as D Matt Irwin sustained a lower-body injury in the third period of San Jose's trip finale in Nashville on Tuesday. ... Sharks RW Tyler Kennedy returned after missing four games due to illness while LW James Sheppard and Tennyson were healthy scratches. ... Sharks C Logan Couture underwent successful surgery Wednesday to repair his injured right hand and will miss a minimum of 3-4 weeks. ... LW Tomas Hertl, RW Martin Havlat, RW Raffi Torres, RW Adam Burish and Irwin are out injured for the Sharks. ... Detroit has its share of injury woes as well. C Pavel Datsyuk missed Thursday's game with a lower-body injury, skated on his own, and hopes to return this weekend. ... RW Johan Franzen hopes to return this weekend after sustaining a concussion Dec. 15. C Darren Helm (lower body) missed his third straight. He, too, hopes to return Saturday in Los Angeles.