Carey Price made the initial save on the play that led to van Riemsdyk's goal that gave the Flyers a 4-3 lead. Canadiens defenseman Roman Hamrlik's clearing attempt put the puck right on the Philadelphia forward's stick for an easy tally.
Claude Giroux made it a two-goal lead with his 16th goal at 15:28. Sergei Bobrovsky made 38 saves for his 15th win. Jeff Carter had a goal and an assist, and Nikolay Zherdev also scored for the Flyers, who lead the NHL with 47 points.
P.K. Subban had a goal and an assist for Montreal, which has lost three in a row for the first time this season. Tomas Plekanec and Brian Gionta scored 2:54 apart midway through the third for the Canadiens, who trailed 2-0 and 3-1.
Price made 25 shots.
The Flyers have won nine of 13 (9-1-3). They ended Pittsburgh's 12-game winning streak with a 3-2 victory on Wednesday night and moved past the Penguins for first place in the NHL.
Carter scored his 12th goal with 17.6 seconds left in the first period and assisted on van Riemsdyk's goal in the second that went in off Montreal defenseman Hal Gill.
Bobrovsky made a huge save in the final seconds of the first. The rookie stuck out his paddle to stop Hamrlik's shot off a loose puck just before time ran out.
Plekanec scored his 10th goal 7:01 into the third to draw Montreal within 3-2. Gionta tied it with his 10th goal at 9:55.
Subban, who earned his second point of the game with an assist on Gionta's goal, scored his second goal of the season on a 5-on-3 power play late in the second period to cut Montreal's deficit to 2-1.
Michael Cammalleri and Scott Gomez each had two assists for Montreal. Gomez returned after missing two games because of a lower body injury. He centered a line with Gionta and left wing Max Pacioretty, who made his season debut after he was recalled from Hamilton of the AHL on Sunday.
NOTES: Flyers LW Jody Shelley sat out the final game of his two-game suspension for his hit from behind on Boston's Adam McQuaid on Saturday. ... Centers Dustin Boyd and Tom Pyatt and defenseman Yannick Weber sat out for Montreal.