Andrew McCutchen homered twice and knocked in four runs while Neil Walker had five hits, two RBI and four runs scored as the Pittsburgh Pirates routed the San Francisco Giants, 13-2, in the rubber match of a three-game series at PNC Park.

A.J. Burnett (10-2) allowed two runs on four hits and two walks over 6 1/3 innings to become just the fifth Pirates pitcher since 1990 to enter the All- Star break with 10 wins.

He joins Neal Heaton in 1990 (10-5), Randy Tomlin in 1992 (10-5), Bob Walk in 1993 (10-6) and Kevin Correia in 2011 (11-7).

Casey McGehee added three hits and a pair of RBI before leaving the game in the sixth inning with a left groin strain for Pittsburgh, which enters the break having won six of its last seven games and in first place in the NL Central.

"I feel like it's pretty good for us to end how we did in the first half of the season," said McCutchen. "Hopefully we can continue that momentum going into the second half."

Tim Lincecum's (3-10) struggles continued as he surrendered six runs on seven hits and a walk through 3 1/3 innings for the Giants, who head into the break having dropped seven of their last nine.

"I never wanted to say I've hit rock bottom or anything like that, but when things are going as bad as they are right now you kind of have to go out there feeling like you have nothing left to lose," said Lincecum. "I have to remember this and use it to know what I don't want to go through again."

Pittsburgh started its onslaught in the bottom of the first inning when McCutchen followed Walker's one-out double with a blast over the right-center field wall.

Walker made it a 3-0 game in the third inning with a solo shot to straightaway center field.

The Pirates pulled even further away in the fourth inning after loading the bases with one out on a base hit by McGehee, a walk by Rob Barajas and Clint Barmes' bloop single to shallow center field. Burnett then slapped a base hit up the middle to plate McGehee and knock Lincecum out of the game.

Clay Hensley entered next and gave up a sacrifice fly to Drew Sutton and an RBI single by Walker to give Pittsburgh a 6-0 advantage.

Garrett Jones then singled in the fifth, advanced to third on McGehee's double to right and came home on Barmes' two-out grounder to third that Pablo Sandoval fielded, but unsuccessfully attempted to tag McGehee as he ran to third instead of throwing the ball to first.

Burnett, meanwhile, retired 13 straight batters following Buster Posey's two- out walk in the first inning until Nate Schierholtz led off the sixth with a pinch-hit single.

But Schierholtz would advance no further as Burnett sat down the next three batters and the Pirates increased their lead to 10-0 in the home sixth on McGehee's two-run single and a pair of errors by Ryan Theriot when he first bobbled Alvarez's grounder to second and then threw the ball well over the head of catcher Hector Sanchez, allowing pinch-runner Gorkys Hernandez to score.

Sandoval's two-run homer in the seventh inning got the Giants on the board before McCutchen answered with a two-run home run in the bottom of the frame.

Brad Lincoln's RBI single in the eighth inning capped the scoring.

Game Notes

Walker extended his hit streak to 12 games...Burnett's run-scoring single was his first RBI since August 9, 2005, while with the Marlins. He also extended his unbeaten streak to 12 consecutive starts...Lincecum dropped his fifth straight road decision and fell to 1-2 in five career meetings with Pittsburgh...The Pirates racked up 17 hits, while the Giants had just four.