The Capitals jumped ahead 2-0 in the opening 8:15 before giving up a score with 5.6 seconds left in the first period and allowed the tying goal in the second.

"It's a coach's worst nightmare, giving up a late goal, and they tied it later, but the guys just kept pushing," Capitals coach Dale Hunter said.

Alexander Semin had a goal and set up Jay Beagle's go-ahead score, leading Washington to its second consecutive win after a three-game losing streak (0-2-1). It was Washington's 12th road win of the season in 33 games (12-18-3).

"I think we started pretty well," Washington's Alex Ovechkin said. "I think we found a way to put the puck in their zone, make a cycle and put traffic in front of the net."

The Capitals moved two points ahead of Winnipeg and is in sole possession of eighth place in the Eastern Conference. Washington also trails Florida by one point in the Southeast Division.

Tim Thomas, playing in his eighth consecutive game, made 26 saves for the Bruins.

Bruins coach Claude Julien was upset by his team's effort and concentration at the beginning. The first two goals came off rebounds.

"We talked about it before the game — they've got some guys that are dangerous there. To me it was just careless," he said.

Washington improved to 20-0-0 when it leads after two periods.

Boston tied the game at 2-2 on Marchand's goal 4:58 into the second before the Capitals scored twice over the final 8:38 to take a 4-2 edge into the third.

Seconds after the Bruins killed off Greg Zanon's holding penalty, the Capitals kept the pressure on and Beagle scored on a wrister in the slot off a pass from Semin.

They made it 4-2 on Laich's power-play score late in the period when he redirected former Bruins defenseman Dennis Wideman's shot by Thomas from the slot.

Mike Knuble misfired on a chance to give the Capitals a three-goal lead. He hit a post with just over 7 minutes to play.

Boychuk then cut it to 4-3 when he came charging in to score off a rebound with 3:13 left in the third, scoring in his second consecutive game after not getting a goal since Dec. 3.

The Bruins pulled Thomas for an extra skater with 1:20 to play and Washington held on despite a pair of chances on scrambles in front.

Marchand tied it at 2-all when he collected a loose puck at center ice after Jordan Caron checked Ovechkin into the boards, sending the puck free. He skated in alone, waited and slipped a shot between Vokoun's pads.

The Capitals scored a pair of goals 25 seconds apart in the opening period to grab a 2-0 lead. Semin collected the rebound of Karl Alzner's shot right in front and slipped a shot behind Thomas at 7:50 of the period.

On the ensuing shift, Troy Brouwer tipped Dmitry Orlov's shot from the point and the puck caromed over to Hendricks, who fired a shot into a wide-open net at 8:15.

The Bruins called timeout after the second goal and controlled play for the rest of the period, cutting it to 2-1 when Lucic slipped a short wrist shot between Vokoun's pads off a faceoff in the closing seconds of the first.

"Obviously we came out flat and they got the lead," Bruins center Patrice Bergeron said. "We're not going to win too many games if we're battling back all game."

Boston outshot Washington 10-1 after the timeout.

But, that did little to help the Bruins in the second period. The Capitals took over following Marchand's tying goal, outshooting Boston 12-4 for the rest of the period.

Washington posted a 15-7 edge in shots on goal in the second and scored twice, collecting eight of its shots on power plays.

Notes: Injured Bruins G Tuukka Rask, out four to six weeks with a lower abdomen/groin strain groin suffered last Saturday, said before the game that it's "probably closer to six weeks than four. That would be right around playoff time and I think we're going to shoot for that, and hopefully it's better by that time." … Vokoun started his second straight game. … Boston LW Benoit Pouliot was a late scratch with what the team announced as a "lower body injury" early in the second period. "After warm-up, he said he can't go," Julien said. Boston used D Mike Mottau at forward. "I thought he did a great job," Julien said. "He was very adequate as a replacement." … Lucic has two goals, five assists in his past six games. … The Capitals host Toronto on Sunday before a five-game road trip. … Boston plays at Pittsburgh Sunday.

Copyright 2012 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.

For more information about reprints & permissions, visit our FAQ's. To report corrections and clarifications, contact Standards Editor Brent Jones. For publication consideration in the newspaper, send comments to letters@usatoday.com. Include name, phone number, city and state for verification. To view our corrections, go to corrections.usatoday.com.

Posted | Updated

USA TODAY is now using Facebook Comments on our stories and blog posts to provide an enhanced user experience. To post a comment, log into Facebook and then "Add" your comment. To report spam or abuse, click the "X" in the upper right corner of the comment box. To find out more, read the FAQ and Conversation Guidelines.