The game wasn't won on a pretty goal, but to the Vancouver Canucks and their long-suffering fans the result was a masterpiece.

Defenceman Kevin Bieksa scored on a knuckleball shot at 10:18 of the second overtime as the Canucks beat the San Jose Sharks 3-2 Tuesday night to advance to the Stanley Cup final for the first time in 17 years.

It was a strange finish to a nail-biting game that the Sharks had dominated, outshooting Vancouver 56-34.

Vancouver's Alex Edler fired a puck that hit the stanchion in the glass along the side boards. Many of the Shark players lost sight of the puck and didn't see it bounce out to Bieksa at the blue-line.

He swatted a rolling puck that bobbed and weaved past San Jose goaltender Antti Niemi.

"It was an ugly goal but definitely one you will take," a grinning Bieksa said amid the celebrations in the Canuck dressing room.

"It was a knuckleball. I barely got enough wood on it to get it on net. It was probably the ugliest goal of my career, but the biggest."

The minute the Canucks scored Vancouver goaltender Roberto Luongo raised his stick in victory. Blue confetti rained from the roof of Rogers Arena as the team poured off the bench to mob Bieksa.

A loud, sellout crowd of 18,860 began chanting "we want the Cup" as the Sharks watched numbed and exhausted.

Vancouver won the best-of-seven Western Conference final 4-1. It's the third time in franchise history the Canucks have reached the final, but they have never won the Cup.

"We worked all out lives for this, not only this season," said Luongo, who made an incredible 54 saves. "Growing up as a kid, this is where you want to be.

"We have the biggest step of all coming ahead of us. But right now I think we're having the time of our lives and we're enjoying every step of the way."

The Canucks forced the overtime when Ryan Kesler scored with 13.2 seconds left in the third period. The gritty centre tipped a shot by Henrik Sedin past Niemi.

"They battled hard, we battled just as hard and we battled right to the end," Kesler said. "We deserved this game tonight."

There were some anxious moments in the second period when Kesler limped off the ice favouring his left leg and went directly to the dressing room. He returned several minutes later.

"He's an animal out there," said forward Alex Burrows, who scored Vancouver's other goal. "It's all about heart.

"His mind really pulls his legs and puts him into those pressure moments. He came back strong."

While Bieksa's goal killed the Sharks, it was the play of Luongo that kept the Canucks alive.

San Jose outshot Vancouver 16-9 in the first overtime. Luongo kept Vancouver in the game by making a glove save of a Kyle Wellwood shot and blocking a deflection off the skate of Ian White.

In the first period Luongo stopped Sharks' captain Joe Thornton three times, once during a five-on-three San Jose power play. Thornton, who played with a separated shoulder, also had a shot bank off the post behind Luongo and slide across the goal-line.

"That's why you play, to be in situations like that," said Luongo, the goalie who helped Canada win the gold medal at the 2010 Winter Olympics. "You know, overtime in a conference final, you dream of things like that.

"I felt great the whole game. I was in the zone. I was just having fun out there."

Canuck captain Henrik Sedin had two assists. He leads the playoffs with 19 assists and 21 points.

The Swede compared going to the Stanley Cup final to the 2006 Olympic gold medal he won with twin brother Daniel.

"For us, it's up there with the Olympic gold medal for sure," he said. "It's a tough journey to go through to get here.

"The Olympic medal, it's a short tournament. This is way tougher."

The game was played exactly 17 years after Greg Adams scored in double overtime to give Vancouver a 4-3 victory over the Toronto Maple Leafs in the 1994 Western Conference final. The Canucks would lose the Stanley Cup final in seven games to the New York Rangers.

The Canucks will now wait for the winner of the Eastern Conference final between the Boston Bruins and Tampa Bay Lightning. The Bruins lead that series 3-2 with Game 5 Wednesday night.

For now, the Canucks were happy to savour the victory.

"I think our players deserve it," said Vigneault. "I think our organization and our fans deserve it."

It was a frustrating loss for the Sharks.

Coach Todd McLellan could only shake his head over the winning goal.

"The only guy who knew where that puck was, was Kevin Bieksa and he almost fanned on it," said McLellan said. "It's one of those things you have no control over. We can talk about it all we want. There is nothing we can do about it."

Patrick Marleau, on the power play, and Devin Setoguchi scored for the Sharks.

Marleau said the game was decided on a tough break.

"It's a bounce," he said. "They got it."

Setoguchi gave San Jose a 2-1 lead with just 24 seconds gone in the third. A bouncing puck at the blue-line got past Canuck defenceman Alex Edler, giving Setoguchi and Joe Pavelski a two-man breakaway on Luongo.

Luongo rushed out of his net to try and get to the loose puck. Pavelski slid the puck under a diving Luongo to Setoguchi, who had an open net to shoot into.

The win was a relief for the Canucks, who have struggled to finish off other series.

Vancouver is 3-4 in playoff elimination games this spring and 1-2 in Game 5s.

Vancouver took a 3-0 lead over the Chicago Blackhawks in the opening round of the playoffs, then needed a goal in overtime of Game 7 to defeat the defending Stanley Cup champions.

The Canucks were forced to make an extra trip to Nashville in the second round when they lost Game 5 of that series 4-2. They defeated the Predators 2-1 in Game 6.

The Canucks' other trip to the final came 1982 when they lost in four straight games to the New York Islanders.

The Canucks won the Presidents' Trophy this year for the first time in franchise history for finishing the regular season with a league-leading 117 points. That was 12 more than the Sharks, who finished second in the Western Conference.