Maybe Flyers coach Peter Laviolette was being honest when he said he started backup goalie Brian Boucher on Monday night against Montreal because he was coming off a strong performance.

Or maybe the Flyers, who will have a goalie logjam when Michael Leighton returns from an injury, were showcasing Boucher for a possible trade.

Whatever the reason for his start, Boucher overcame a shaky first period - and so did the Flyers, who rallied past the Canadiens, 3-2, before an animated sellout crowd at the Wells Fargo Center.

Second-year winger James van Riemsdyk ended six weeks of frustration by scoring his first goal of the season and snapping a 2-2 tie with 12 minutes, 18 seconds left in the game.

Taking a feed from defenseman Braydon Coburn, van Riemsdyk scored from the right circle, then punched the air triumphantly before exchanging fist bumps with his teammates on the bench.

"It's been a while, and sometimes you forget how great it feels to score," said a relieved van Riemsdyk, who has been playing on Mike Richards' line recently. "I just have to keep this roll going."

Van Riemsdyk, 21, hadn't scored in his first 17 games this season.

"It's been a tough go for him here . . . but he's been working hard, and he's a good kid," Boucher said after the Flyers overcame a 2-0 deficit and avenged last Tuesday's 3-0 loss in Montreal. "We all believe in him, and it's a matter of him getting his confidence back. There's a reason he was the second overall pick" in 2007.

Boucher said van Riemsdyk "doesn't have to worry about being the guy" on a team loaded with scorers. "He should just worry about working on his game, and showing up every night. Tonight was a big goal. Hopefully, this is a sign of good things to come."

The Flyers took the NHL lead with 30 points. Washington also has 30, but the Flyers have the tiebreaker over the Caps. This is the first time the Flyers are No. 1 overall in the league - after at least 20 games - since Jan. 14, 2006.

The Flyers had tied the score at 2 on Claude Giroux's team-high 12th goal. The shifty center, who won 71 percent of his face-offs Monday, took a pass from Darroll Powe and knocked a short shot past Carey Price (42 saves) 1:48 into the third period.

Montreal dominated the first period, but the Flyers controlled the rest of the game. They outshot the Canadiens, 36-16, over the final two periods.

The war of words between Richards and Montreal rookie P.K. Subban, which started during last week's game and escalated in the media, didn't translate into any fights between the Eastern Conference rivals.

At the end of the first period, the Flyers skated off the ice to boos.

Montreal outshot the Flyers, 15-9, winning 63 percent of the face-offs, and building a 2-0 lead on a pair of weird goals.

Goal No. 1: A low, blue-line shot by center Maxim Lapierre beat Boucher, sneaking inside the right post with 8:09 left in the opening period.

Goal No. 2: Lapierre scored again when his shot from the right circle deflected off the stick of defenseman Andrej Meszaros and past a stunned Boucher with 3:53 to go in the period.

The Flyers had 13 of the first 14 second-period shots, and Price had all the answers. He stopped a Matt Carle power-play drive with his mask, turned aside Nik Zherdev from the left side of the net, and frustrated Ville Leino on a rebound attempt.

But with 5:07 left in the second period, the Flyers ended a scoring drought of 94:53 against Price this season as Leino, from the left circle, one-timed a a pass from Danny Briere past the 6-foot-3, 219-pound goalie to trim the deficit to 2-1.

The Flyers had been 0-4-1 when trailing after two periods, but Giroux, van Riemsdyk and Boucher answered in the final 20 minutes.