PITTSBURGH -- It was supposed to be a pitcher's duel four decades in the making, but it didn't turn out that way.
This marked the first time the major-league win leader (Pittsburgh right-hander Gerrit Cole) faced the major-league strikeout leader (Los Angeles left-hander Clayton Kershaw) this late in a season since the Chicago White Sox's Wilbur Wood squared off against the California Angels' Nolan Ryan on Aug. 11, 1973, according to the Elias Sports Bureau.
Yet neither pitcher had a particularly good outing or factored in the decision.
In the bottom of the 10th, the Pirates loaded the bases with none out against right-handed reliever Jim Johnson (2-4) as shortstop Jung Ho Kang walked, catcher Francisco Cervelli singled and first baseman Sean Rodriguez had a bunt single.
"You don't care where the defense is," Alvarez said. "My entire focus of the at-bat is on the pitcher and what he's trying to do. That's all you can control."
The Pirates won for the 13th time in their last 16 home games and improved to 37-18 at PNC Park this season. They are 12-2 against National League West teams.
Left-handed reliever Antonio Bastardo (4-1) pitched a scoreless 10th for his second win in as many games.
Kershaw had his streak of 37 consecutive scoreless innings end when Pirates right fielder Gregory Polanco hit his first pitch of the game for a home run. Kershaw, who had won his previous four starts, gave up four runs and nine hits in six innings with two walks and five strikeouts.
"It was a tough one," Kershaw said. "I struggled all the way through pretty much and give the Pirates credit. They did a good job battling me the whole night and I just didn't really have good stuff.
"I was getting two strikes a few times and couldn't really put anybody away. Both breaking balls weren't really working the way I wanted to, so it was just a battle."
Kershaw raised his season strikeout total to 197, leaving him three shy of a sixth straight season with at least 200.
Cole allowed three runs and four hits in six innings while striking out five and walking three. His record remained 14-5, though, and he has only one win in four starts since the All-Star break.
"I was really sporadic at times," Cole said. "Fortunately, we caught (Kershaw) on a kind of an off night, too. It was just kind of weird game, not what everyone expected."
Cole pitched at least six innings for the 18th time in 22 starts this season -- the other four have been against Cincinnati. He has allowed three runs or fewer in all but one start.
Shortstop Jimmy Rollins had three of the Dodgers' six hits and drove in two runs. Second baseman Howie Kendrick had two hits, including a two-run infield single on which Rollins sprinted home from second base.
The Dodgers tied it 4-4 in the seventh inning when Rollins hit a two-out RBI double.
The Pirates pulled ahead 4-3 in the fifth when McCutchen hit an RBI double and scored on Ramirez's single.
Rollins had put the Dodgers ahead 3-2 in the top of the fifth with a one-out RBI single.
The Pirates pulled into a 2-2 tie in the fourth when catcher Chris Stewart drew a bases-loaded walk from Kershaw with two outs after the Dodgers had gone ahead on Kendrick's two-run infield single with two outs in the third.
NOTES: The Dodgers released OF Chris Heisey. He had been designated for assignment July 30. ... Pirates LHP J.A. Happ will have his turn in the rotation skipped and not start in the three-game series against the National League Central-leading Cardinals that begins next Tuesday at St. Louis. Happ lost his Pirates' debut Tuesday night, giving up four runs in 4 2/3 innings to the Chicago Cubs after being acquired from Seattle in a trade July 31. ... RHP Deolis Guerra was returned to the Pirates as a waiver claim by Cleveland was voided by Major League Baseball because he was found to have left knee inflammation. Guerra was placed on the 15-day disabled list, and Triple-A Indianapolis RHP Wilfredo Boscan was designated for assignment to clear a spot on the 40-man roster. ... Los Angeles RHP Mat Latos (4-7, 4.29 ERA) faces Pittsburgh LHP Francisco Liriano (7-6, 2.92 ERA) on Saturday afternoon in the middle game of the three-game series.