PITTSBURGH - Jeff Locke ran his personal winning streak to eight games, Pedro Alvarez hit a three-run homer and the Pittsburgh Pirates hung on to beat the Philadelphia Phillies 6-5 Wednesday night.
Locke (8-1) was scored upon for the first time in four home starts but extended his unbeaten streak to 16 outings. Locke, who hasn't lost since his first start of the season, allowed two earned runs on seven hits and three walks over 5 2/3 innings.
The Pirates took the lead with a four-run fifth punctuated by Alvarez's 21st home run.
Andrew McCutchen reached base five times, scoring twice for the Pirates (52-31), who have the majors' best record and had a nine-game winning streak snapped in the series opener Tuesday.
Delmon Young and Domonic Brown each had three hits for the Phillies, who have lost four of six. Young has 1,001 career hits.
Brown's two-run homer with two outs in the ninth pulled the Phillies within one, but Jason Grilli stuck out Young to seal his NL-best 28th save.
Today: Philadelphia Phillies at Pittsburgh Pirates, 1:35 p.m.
Pitching matchup: Phillies LHP Cole Hamels (2-11) vs. Pirates RHP Gerrit Cole (4-0)
Philadelphia's John Lannan (1-3) fell to 1-5 in his career against the Pirates, getting tagged for four runs on 11 hits and three walks in five innings.
Still, he kept Pittsburgh off the scoreboard through four. The Pirates left seven men on base in that time, getting eight baserunners but driving none of them home.
Pittsburgh loaded the bases with no outs in the second but did not score; Locke struck out and Starling Marte bounced into a double play.
That changed in the fifth when McCutchen, Sanchez and Martin hit consecutive one-out singles, the latter driving in a run. Alvarez followed with his fourth home run over his past six games against the Phillies.
Those runs erased an early deficit for the Pirates. When Ben Revere drove in Brown with a bloop single to left with two outs in the fourth, it snapped a 24-inning scoreless streak for Locke at PNC Park. That's the longest home shutout innings streak for a Pirates pitcher since Jerry Reuss did it for 34 innings in 1975.
Locke, who had his scheduled start bumped back a day when he was forced to warm up in the bullpen, had three consecutive home starts in which he did not allow a run between May 14 and Wednesday.
Justin Wilson allowed an RBI single to pinch hitter Kevin Frandsen but - after a Jordy Mercer error led to another Phillies run - struck out Chase Utley to end the sixth.
Jeanmar Gomez struck out pinch-hitter Ryan Howard to finish a scoreless seventh and Mark Melancon worked a perfect eighth.
Brown's home run off of Grilli snapped a 27 1-3-inning scoreless streak by the Pirates' bullpen. Brown has three home runs through nine games on Philadelphia's road trip and a team-high 22 on the season.
Game notes: Martin's second RBI came when he doubled in McCutchen in the sixth. ... Howard was not in the starting lineup for the second time in a four-game span. Howard, who snapped out of an 0-for-22 slump with two hits Tuesday, has been bothered by a sore left knee all season. He was walking gingerly after Tuesday's game, one in which he scored from first by sprinting on a double during the sixth inning. ... The Pirates activated OF Jose Tabata before the game and optioned RHP Brandon Cumpton to Triple-A Indianapolis. Cumpton was recalled to start Tuesday's game in lieu of Locke. ... Buoyed by thousands of Phillies fans who made the drive across the commonwealth, the announced paid crowd of 33,197 was the Pirates' eighth consecutive of at least 30,000 at home. ... RHP Gerrit Cole is the first Pirates pitcher to win each of his first four career starts in more than a century. He makes his fifth major-league start in the series finale Thursday. LHP Cole Hamels (2-11, 4.58), who starts for the Phillies, has one win since April.