San Francisco, CA (SportsNetwork.com) - Andrew McCutchen went 4-for-5 and finished a home run shy of the cycle in the Pittsburgh Pirates' 7-4 win over the San Francisco Giants on Tuesday.

McCutchen drove in two runs and scored twice for the Pirates, who have won the first two games of this three-game series. Jordy Mercer hit a solo homer and Pedro Alvarez knocked in a pair of runs.

Pittsburgh starter A.J. Burnett (6-1) won his sixth straight start after allowing four runs on eight hits over five innings. The right-hander struck out five and walked two.

Brandon Crawford hit a two-run homer for the Giants, who have lost four straight. Buster Posey drove in two runs.

Chris Heston (5-4) gave up five runs on seven hits while striking out six and walking three over 3 2/3 innings.

The Giants jumped out to a 2-0 lead in the first. With runners on second and third and one out, Posey hit a two-run double to right.

Pittsburgh went ahead with a four-run third. Josh Harrison singled and Gregory Polanco walked prior to McCutchen's RBI single. Starling Marte walked to load the bases with one out. Polanco scored on a wild pitch and Alvarez followed with a two-run double to left.

Crawford's two-run homer in the home half made it 4-4.

The Pirates took the lead back in the fourth. McCutchen hit a two-out triple, chasing Heston from the game. Yusmeiro Petit came in from the bullpen and Neil Walker greeted him with an RBI single to center.

"Those two-out hits are hard to get and they got a big one there off of Petit," Giants manager Bruce Bochy said. "We couldn't get one (two-out hit) tonight."

Mercer's solo shot an inning later made it a two-run game.

Pittsburgh tacked on another run in the sixth when Polanco singled and scored on McCutchen's double to right.

San Francisco failed to score after loading the bases with two outs in the eighth. Tony Watson got Joe Panik to ground into a fielder's choice.

Mark Melancon tossed a scoreless ninth for his 15th save of the season.

Game Notes

Panik went 1-for-4 and has now hit safely in each of his last 16 games at AT&T Park ... Burnett improved to 7-3 lifetime against the Giants ... San Francisco went 1-for-12 with runners in scoring position and stranded 11 ... This is the first series between the clubs since the Giants blanked the Pirates 8-0 to win last season's NL Wild Card Game.