SAN FRANCISCO (AP) Andrew McCutchen was fed up. His batting average had dipped below .200 and he figured it was time to get going. He's going in a big way.
McCutchen had four hits and drove in two runs, Pedro Alvarez drove in a pair and the Pittsburgh Pirates won for the 10th time in 12 games, beating the San Francisco Giants 7-4 Tuesday night.
''I was fed up,'' McCutchen said. ''That's still how I feel and I'm not done yet. There is more where that came from.''
McCutchen improved to .398 (37-for-93) over his past 26 games, with 11 doubles, a triple, five homers, 21 RBIs and 17 runs scored.
He's raised his average to a season-high .292 since ending the day of May 5 at .185.
''That's vintage Cutch,'' Pirates manager Clint Hurdle said. ''He's swinging the bat well, has been on a nice run and has been aggressive on the bases. He's the catalyst of the lineup. Just his presence, he continues to interact during the game and keeps pushing these guys forward.''
Jordy Mercer hit his first home run of the season and Neil Walker drove in a run as the Pirates clinched their third series win in the last five played in San Francisco.
Brandon Crawford hit a two-run home run and Buster Posey drove in a pair of runs for the Giants, who lost their fourth straight.
Mercer hit his third home run in nine games in San Francisco. He's only hit more in Wrigley Field (20 games) and PNC Park, both five.
A.J. Burnett (6-1) struggled in his second straight start and still managed to win his sixth consecutive, allowing four runs and matching his season-high with eight hits. He walked two and struck out five in winning his first game at AT&T Park in nearly 10 years.
''I'm going to find a way to get out of jams,'' Burnett said. ''I want to figure out a way to get back into the dugout and let these guys do their work.''
Mark Melancon pitched the ninth for his 15th save in 16 chances.
Chris Heston (5-4) had a three-game winning streak snapped after giving up five runs on seven hits in 3 2-3 innings, his shortest outing at home and second shortest of the season. He walked two and struck out two.
''I just got away from attacking the zone,'' Heston said. ''I'm just throwing breaking balls that are clearly out of the zone. I just got away from throwing quality strikes.''
Home plate umpire and crew chief Bill Miller initiated the 4 minute, 35 second review of Crawford's game-tying homer in the third inning. A fan appeared to reach over the railing to make the catch, though replays proved inconclusive.
''It was a terrible pitch,'' Burnett said. ''He should have hit it out.''
Hunter Pence went 3-for-5 after getting three hits in his previous 27 at bats.
Pirates: RHP prospect Jameson Taillon, recovering from Tommy John surgery, threw about 40 pitches at extended spring training, a step toward beginning a rehab assignment.
Giants: RHP Matt Cain (flexor tendon strain) is heading to extended spring training in Arizona to throw about 45 pitches, or three innings. ''He's got to be excited about it,'' Giants manager Bruce Bochy said. ''It's taken a lot of time to get to this point.''
Pirates: LHP Francisco Liriano (2-4, 3.47) gets the start in series finale. He pitched six scoreless innings in his last start but received a no-decision. He has a 1.57 ERA in five road starts and 2-1 with a 4.76 ERA in three starts against the Giants.
Giants: RHP Tim Hudson (3-4, 4.62) starts against the Pirates on Wednesday, against whom he has a three-game losing streak. He last earned a win against the Pirates on April 29, 2012. Hudson went seven innings his last time out, allowing a run on five hits.