Updated

Andrew McCutchen hit two solo homers to lead the Pirates to a 5-3 win over the Nationals in the finale of a two-game series Thursday.

Rod Barajas added a two-run homer and Neil Walker also drove in a run for the Pirates, winners in four of their last six games.

James McDonald (3-2) took a no-hitter into the sixth and earned the win after giving up three runs on four hits while striking out 11 over 5 2/3 innings. He said he wasn't upset to lose the no-hit bid.

"My goal at the end of the day is to see my team walk off with a victory," he said. "We accomplished that today. I kept my team in the game the best I could and the bullpen and the guys stepped up and kept it going."

Ryan Zimmerman drove in a pair of runs and Adam LaRoche had a RBI triple for the Nationals, losers in two of three.

Jordan Zimmermann (2-4) was pegged with the loss after surrendering four runs on seven hits over six frames.

"You look at that game and it seemed like the mistakes he made got hammered," said LaRoche. "So I think it was one of those games where it wasn't as bad as it looked."

The Pirates jumped ahead 1-0 in the first after McCutchen belted a 1-1 fastball over the right field wall.

Pittsburgh tacked on two more in the fourth when Barajas launched his third homer of the season. Casey McGehee drew a two-out walk before Barajas sent Zimmermann's 0-1 fastball into the stands in left.

McCutchen roped his second homer of the night and fifth of the season leading off the sixth to make it 4-0. Zimmermann hung a first-pitch slider and McCutchen made him pay, crushing the ball deep into the left field bleachers.

The Nationals made it 4-3 in the home half after a two-run double from Zimmerman and a LaRoche's RBI triple. Jesus Flores opened the frame with a double and pinch-hitter Steve Lombardozzi followed with a two-base hit of his own, putting runners at second and third. McDonald was able to get two outs before Zimmerman roped a single to right, plating both Flores and Lombardozzi. LaRoche followed with a triple, cutting the Pirates lead to just one.

Pittsburgh picked up a run in the seventh to go up 5-3. Josh Harrison doubled before moving to third on a sacrifice bunt. A Jose Tabata walk put runners on the corners for Walker, who grounded into a double-play, plating Harrison.

The Nationals had runners at second and third in the seventh following a perfectly executed sacrifice bunt from Flores, but Juan Cruz, who entered the game in relief, was able to get Lombardozzi to ground out and fanned Ian Desmond to end the inning.

Washington put two runners on with one out in the ninth but Joel Hanrahan slammed the door shut on a comeback, retiring the next two hitters en route to his eighth save.

Game Notes

McDonald has struck out 44 batters in his last five starts...The Pirates are 12-0 when leading after six this season...Nationals outfielder Bryce Harper finished the game 0-for-3 with a walk.