PHILADELPHIA (AP) - Filling in for Jaromir Jagr, James van Riemsdyk played like an All-Star.

Van Riemsdyk's second goal on the power play with 32.8 seconds remaining lifted the Philadelphia Flyers to a 5-4 victory over the Chicago Blackhawks on Thursday night.

Brent Seabrook and Patrick Kane scored 25 seconds apart late in the third period to tie it, but van Riemsdyk made sure the Flyers shook off the disappointment from their Winter Classic loss.

"I felt pretty confident out there. We had some good chemistry tonight," said van Riemsdyk, who moved up from the fourth line to the first one to replace the injured Jagr.

Van Riemsdyk was one of the few bright spots in Philadelphia's short playoff run last year, scoring seven goals in 11 games. But he struggled at times this season and didn't seem on track.

Until now.

"JVR was good," coach Peter Laviolette said. "It was his best game. I think the fact that he was skating to be physical, he was banging bodies. I think this is a game he can use to get excited about, go into the next game and build off it."

Scott Hartnell, Harry Zolnierczyk and van Riemsdyk scored goals in a span of 4:20 in the second period, and Jakub Voracek also scored for the Flyers against Ray Emery in his first game back in Philadelphia.

Ilya Bryzgalov made 30 saves to earn his first win since Dec. 13.

Claude Giroux set up van Riemsdyk's winning goal with a perfect pass to Hartnell, who slid the puck across the crease to his new linemate. Van Riemsdyk shot it into an open net to give the Flyers a 5-4 lead.

"Scotty just put it on tape and set it up for me. Made it easy for me," van Riemsdyk said.

Jimmy Hayes and Andrew Shaw also scored for Chicago. It was the Blackhawks' first game in Philadelphia since skating off the ice with the Stanley Cup after their overtime victory in Game 6 of the finals on June 9, 2010.

Coming off a 3-2 loss to the New York Rangers in the Winter Classic across the street at Citizens Bank Park, the Flyers started slow and didn't score until the final minute of the first period.

Braydon Coburn's slap shot from the point sailed wide of the net and ricocheted off the boards to Voracek, who wristed it in from the left circle.

The Blackhawks went up 1-0 when Hayes scored following a turnover by Zac Rinaldo in Philadelphia's zone. Rinaldo's clearing attempt went to Jamal Mayers, who sent a shot toward the net. Hayes redirected it past Bryzgalov.

Rinaldo made up for his gaffe right after the ensuing faceoff. The rookie enforcer took on Shaw, giving the youngster a tough introduction in his NHL debut. Rinaldo's first punch opened a huge gash above Shaw's left eye and blood squirted onto the ice.

Shaw got some stitches and then showed off his offensive skills in the second period, giving the Blackhawks a 2-1 lead. He skated in from behind the net, made a nifty move around Kimmo Timonen and backhanded a shot past Bryzgalov.

"The fight, he challenged me and I accepted," Shaw said. "I knew what type of fighter he was. He's a well-respected player in the league. He would just keep throwing punches. He got one early. I hit him with a few late."

A turnover by Marc-Andre Bourdon set up Kane's tying goal. Bourdon's clearing pass went to Jonathan Toews. Kane then blasted a shot from the slot just under the crossbar. An angry Bourdon smashed his stick across the net, breaking it into two pieces.

Bryzgalov, who signed a nine-year, $51 million contract in June, didn't start the last two games and wasn't disappointed about watching the Winter Classic from the bench. He even told reporters that Sergei Bobrovsky gave the Flyers a better chance to win. They blew a 2-0 lead against the Rangers.

Bryzgalov didn't speak after this game. He said he wasn't feeling well.

Bryzgalov wore new pads, a brown leather pair reminiscent of the ones former Flyers goalie Pelle Lindbergh used. Lindbergh died in a car accident in November 1985, a few months after winning the Vezina Trophy.

Emery got a second chance in the NHL two years ago with the Flyers, but his stint in Philadelphia ended prematurely. He had hip surgery and missed the Flyers' run to the Cup finals.

Emery also didn't speak to reporters.

"Razor did his job stopping the first chances," Toews said about Emery. "We just have to do better with the second chances."

Notes: Timonen left the game with an upper body injury. His status is uncertain. ... The Flyers improved to 9-6-2 at home. ... This was the only meeting between the teams this regular season. ... The Flyers have won nine straight regular-season games at home against the Blackhawks. Chicago's last win was Nov. 9, 2006. ... Giroux has 19 points in his last 11 games. ... Jagr injured his left calf against the Rangers.