SAN JOSE, Calif. -- For all their troubles this season, the Detroit Red Wings have managed to save their best efforts for games against one of the top teams in the NHL, the San Jose Sharks.

The Red Wings got goals from Derek Meech and Patrick Eaves in the third period Tuesday to snap a tie and defeat the Sharks 4-2 at HP Pavilion. Detroit is 3-0 against San Jose this season.

“Our team did a good job back-checking, our structure was way better,’’ Red Wings coach Mike Babcock said. “If you can do it against good teams, why can’t you do it every night?’’

The Red Wings were lethargic early, falling behind 2-0, but came back strong. Jimmy Howard made 32 saves to raise his record to 20-11-6.

“It’s a measuring stick for us,’’ Howard said. “They’re the top team in the league, and we feel like we’re still one of the top teams in the league. We both play similar systems with Todd (McLellan, San Jose’s head coach and a former Detroit assistant) being on the other bench. We match up well against them.’’

The Sharks, who lead the Western Conference with 81 points, had gone 8-0-2 since losing at home to Detroit 4-1 on Jan. 9. The Red Wings couldn’t build momentum off that win. They hope things will be different this time.

Meech scored a power-play goal at 4:40 of the third period to put Detroit ahead 3-2. He threw the puck into the crease from behind the goal line. It went in off the back of goaltender Evgeni Nabokov’s right leg.

“I was trying to throw it on net to get something going,’’ Meech said. “Bert (Todd Bertuzzi) made a nice play to get (the pass) through. Got it on my backhand and I just threw it at the net, and luckily, it went in.’’

Meech was on the power play because defenseman Niklas Kronwall did not play in the third period, after

in the first period.

It is the same knee Kronwall injured Nov. 21, causing him to miss nearly 10 weeks. He appeared to reaggravate the injury in Sunday’s loss in Pittsburgh.

Babcock said Kronwall will not play Wednesday night at Anaheim.

Eaves gave the Red Wings breathing room by scoring at 8:58 of the third. Brian Rafalski made a nice pass from the point to Eaves at the side of the crease.

“I thought we stuck with it,’’ Babcock said. “Our good players were good, our specialty teams were very good and we found a way to score enough goals to win.

“Our guys, (Henrik) Zetterberg, (Pavel) Datsyuk and Bertuzzi, playing head to head against (Joe) Thornton’s line (with Patrick Marleau and Dany Heatley) had a real good night.’’

Tomas Holmstrom had a pair of assists in his first game after returning from a broken foot sustained in practice Jan. 6. Valtteri Filppula also had two assists.

The Red Wings regrouped after a rough start, getting goals from Dan Cleary and Zetterberg to tie it at 2-2 heading into the first intermission.

Good work in the corners by Holmstrom and Filppula resulted in Cleary’s goal. Filppula skated out of the corner and made a backhand pass out front to an on-rushing Cleary, who buried a shot past Nakobov.

“The key was we got through the neutral zone,’’ Babcock said. “Sometimes, we’re stubborn that way, we don’t want to just make the D turn around and we force plays instead of just going in and getting on their D and creating things in the offensive zone. I thought we had good physical play in that area.’’

Zetterberg scored during a two-man advantage at 18:58. Nabokov made a pad save on Holmstrom’s backhand attempt from in front of the net. Zetterberg easily knocked in the rebound.

The Sharks started strong, threatening to break the game open in the first period after Thornton scored twice in a span of 3:34 by capitalizing on rebounds.

“They came out quick, were driving hard to the net,’’ Red Wings captain Nicklas Lidstrom said. “Once we settled down and got our first goal, we started playing a lot better, played with a lot more poise and tried to push them to the outside.’’