OAKLAND (CBS/AP) -- A rare full day off turned out to be just what the Pittsburgh Pirates needed to keep Jeff Locke's winning streak going.
Getting six hits and six RBIs from the bottom four batters in the lineup certainly helped, too.
Jody Mercer homered and had an RBI single and the Pittsburgh Pirates rallied from three runs down to beat stumbling ace Sonny Gray and the Oakland Athletics 7-3 on Friday night.
Matt Joyce added two hits, Josh Harrison drove in two runs while Andrew McCutcheon doubled and scored on a wild pitch to help the Pirates to their first win in their history at the Coliseum and just their second in 13 games between the two franchises.
"It's kind of what we saw the first two months of the season when we were connecting all dots, top to bottom in the lineup," Pittsburgh manager Clint Hurdle said. "June was hard. The lineup has played much more consistent . than any other time here."
The Pirates beat the A's in their first meeting since 2013 by taking advantage of another shaky outing by Gray (3-7).
He gave up seven runs, hit a batter and threw two wild pitches in six innings while losing his sixth consecutive decision. The right-hander, third in the 2015 AL Cy Young voting, is winless since April 22.
Marcus Semien hit his 17th home run of the season for Oakland.
"He'll figure it out and he'll get better as the year goes on," A's manager Bob Melvin said. "There's always going to be a year that's not as good as others. So fa this is the one for him."
Pittsburgh's 5-6-7 hitters combined for six hits, five RBIs and four runs scored. Chris Stewart, the No. 9 hitter, drove in the go-ahead run with a fielder's choice grounder in the fifth.
"That's what makes our team us," Harrison said. "It can be anybody, and that's what we have to get back to."
Mercer homered in the third and added an RBI single as part of a two-run fifth.
Harrison's two-out, two-run double in the sixth put the Pirates up 7-3.
Pirates starter Jeff Locke (8-5) also struggled early but retired the final nine batters he faced to win his third straight. He gave up three runs over five innings with three walks and three strikeouts. Three relievers combined to retire the final 12 batters and complete the four-hitter. "It was a strong finish," Hurdle said. "His fastball wasn't of the quality that we had seen the last two times out . but he stayed in the hunt, made pitches, battled and finished very strong. That's a sign of maturity."
Jed Lowrie had decent results while batting leadoff for the first time this season. He drew a walk from Locke in the first before Semien homered on a 3-2 pitch. Oakland's second baseman added an RBI double in the second to make it 3-0.
Pirates: Ryan Vogelsong faced hitters while throwing off the mound in the latest step of his recovery after getting hit in the face with a pitch on May 23. Vogelsong, who underwent surgery on June 2 to repair the multiple fractures he suffered, remains on the 60-day disabled list and isn't eligible to return until July 23. . Right-hander Gerrit Cole (triceps strain) also pitched a simulated game prior to the series opener with Oakland. The Pirates are encouraged but haven't determined what the next step is. . Francisco Cervelli (broken hamate in left hand) continues to make progress and could catch the next round of sim games for Vogelsgong and Cole.
A's: Infielder Tyler Ladendorf was recalled from Triple-A Nashville before the game. Left-hander Dillion Overton, the losing pitcher against San Francisco on Thursday, was optioned down. Overton went 1-1 with an 11.42 ERA in two starts.
Pirates: Right-hander Chad Kuhl (1-0) pitches against Oakland on Saturday in his second career start in the majors after beating Clayton Kershaw and the Dodgers in his debut.
A's: Rich Hill is expected to come off the disabled list to start against Pittsburgh. The left-hander had been out since May 30 with a strained groin.
© Copyright 2016 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed
for more features.