LOS ANGELES — The Sharks are moving on in the playoffs. Heaven knows how.

They won Game 6 in overtime here Monday night even though they blew a lead three times, allowed two power-play goals, then took an inexcusable penalty in the final minutes of the third period — which resulted in a Los Angeles Kings power play that lasted longer than a Dodgers-Giants doubleheader and carried into the extra period.

“We don’t do anything easy,” said Sharks coach Todd McLellan.

Yet on an evening when the Sharks did something so wrong, they also did something quite remarkable. They killed off all five minutes of the penalty against them, under the most pressurized circumstances imaginable.

Then they won the game — and the series — in overtime on what Devin Setoguchi called “a bad pass.”

And he should know. He made it. Or rather, failed to make it. Setoguchi was trying to get the puck to Patrick Marleau, who was gliding toward the net.

“It just went to his feet, though,” Setoguchi said. “It was a bad pass.”

But in overtime, no puck aimed toward the net is a bad decision.

“When the overtime began,” said defenseman Niclas Wallin, “we talked about killing off the rest of the penalty, and then every shot is a good shot. And that’s what happened.”

Setoguchi, who had not taken a shift for the Sharks during the five-minute penalty kill, clearly had the most hop on the ice. He sped with the puck into the offensive zone and swept behind the net to create space for himself, then threw the puck at Marleau charging toward the net.

“I hadn’t played in 20 or 25 minutes,” Setoguchi said, “so I had really fresh legs.”

Marleau’s legs made a good play, too. They collided with the puck and sent it toward Joe Thornton, who spun and flipped it into the goal.

All together now: Sigh of relief.

Three of the Sharks’ four victories in this series were in overtime. But it seemed even closer than that. The Kings are a good young team that will make noise in the future. But the Sharks should have finished them off in five games or fewer.

Instead, we saw some of the traditional short-attention-span theater from our beloved Los Tiburones that resulted in a series that nearly went seven games.

In fact, with 3:42 left in the third period, it was all but a sure thing to go seven. The score was 3-3 after the Sharks had taken leads of 1-0, 2-1 and 3-2 before giving up tying goals each time, twice by failing to kill off Los Angeles power plays. The last sight any Shark wanted to see was a referee’s hand going up for another penalty.

Hello, hand. Sharks forward Jamie McGinn promptly made a sprained-brain play by committing a charging penalty.

After Kings center Brad Richardson had cleared a puck out of his defensive zone, McGinn took a run at him. Richardson ducked. McGinn slammed him backward with Richardson’s head banging off the wood. The referee called it a five-minute major with a game misconduct.

On came the Sharks’ penalty killers, many of them the same players who had allowed the two previous power-play goals.

“I think we were so into the moment, we didn’t have time to think much,” said Sharks defenseman Douglas Murray. “There’s no time to feel sorry for yourself. You’ve just got to do what we’re supposed to do. I think we were relaxed about it — although it would possibly have been different if it were a Game 7. You’ve got to be relaxed because if you try to do more than your job, it doesn’t work.”

This time, it all worked. In the bulk of the five-minute kill before the third period ended, shots were blocked by Wallin, Marc-Edouard Vlasic and Logan Couture. Faceoffs were won by Joe Pavelski and Thornton. Goalie Antti Niemi made three saves, including a crucial one less than 30 seconds before the period ended.

“Winning faceoffs, blocking shots “… all the little details, we got it right,” McLellan said.

Niemi said he couldn’t remember ever facing a five-minute penalty kill during his two-season NHL career.

“There was one shot where they had someone in the middle, and he put it up on my pad,” Niemi said. “And then the puck was at my side and I put my pad on the ice to keep it from going under.”

Hard to say what will happen next — although the Sharks do know that their second-round opponent will be either Chicago (if Vancouver loses Tuesday) or Detroit (if Vancouver wins).

The better option would be Chicago, if only because the Blackhawks had to play seven games in the first round while the Red Wings have been relaxing in their hot tubs since eliminating Phoenix on April 20.

No matter the opponent, however, the Sharks have to play better in the second round. You can’t count on bad passes to win big games every night.

Contact Mark Purdy at mpurdy@mercurynews.com or 408-920-5092.