PITTSBURGH (AP) -- Tom Koehler settled down after a rocky first inning but it was already too late.
The Miami Marlins right-hander gave up four runs in the first then held the Pirates scoreless through the sixth, but Jeff Locke overcame his own shaky start to pitch seven innings and Josh Harrison had three hits to extend his hot streak as the Pirates won 7-3 on Wednesday night.
"It seems like the one big inning keeps biting Tom and it did again tonight," Marlins manager Mike Redmond said.
The Pirates jumped on Koehler quickly with the first four batters reaching base.
Ike Davis' two-run double put Pittsburgh ahead 2-1. Travis Snider brought home a run with a ground out and Jordy Mercer capped the inning with an RBI single.
"I made some good pitches early in the inning that they hit but then I started falling behind in the count and had to come in with my fastball," Koehler said. "They're a very good fastball-hitting team. You don't want to put them in fastball-hitting counts the way I did."
Koehler (7-9) allowed five hits, walked four and struck out four. It was the second time in his last nine starts that Koehler allowed more than three runs.
"I can't give up a four spot in the first inning, especially to this team on the road," Koehler said. "I put us in a bad position."
Locke (3-3) gave up three runs in the first two innings, and then shut out the Marlins over his last five. The left-hander gave up six hits, no walks, and struck out seven, beating Miami for the first time in five starts.
"It's easy to let things snowball, it's easy to let things carry on," Locke said. "I settled down. I started to get more in control."
Christian Yelich hit a two-run homer that drew Miami within 4-3 in the second. The Marlins never scored again and Locke retired the last 13 batters he faced.
Harrison hit a double and scored twice. He is 20 for 44 during a 10-game hitting streak, with six doubles, one triple and five home runs.
Jeff Baker singled in a run in the first for the Marlins.
Russell Martin hit an RBI single in the seventh to give the Pirates a 5-3 cushion before Gaby Sanchez broke the game open with a two-run double.
Marlins: Right-hander Jarred Cosart was scratched from his scheduled start Thursday night because of a strained left oblique muscle. Cosart felt discomfort in his side while playing catch Wednesday and the Marlins decided to have him skip a start. He is tentatively scheduled to pitch next Tuesday against St. Louis. The Marlins got Cosart last week in a trade with Houston. He made his Miami debut the next day and took the loss against Cincinnati, giving up four runs in 5 1-3 innings Friday. He was 9-7 with a 4.41 ERA with the Astros. . Reliever Kevin Gregg is expected to have surgery to remove bone chips from right elbow and miss the remainder of the season. . Right-hander Henderson Alvarez played catch before the game, the first time he had thrown since going on the disabled list July 30 with right shoulder inflammation. He is expected to be activated Aug. 15, the first day he is eligible.
Pirates: Center fielder Andrew McCutchen missed his second straight game because of a fracture and cartilage damage in his lower left rib cage but remains hopeful of avoiding the disabled list. . Second baseman Neil Walker sat out for the third time in four games because of lower back tightness but is expected to return to the lineup Thursday. . Right-hander Gerrit Cole, will make a third rehab start for Triple-A Indianapolis with the date to be determined after he has a bullpen session Thursday. Cole has been on the DL since July 5 with a strained right lat.
Marlins: Rookie left-hander Brian Flynn (0-0, 6.00) will fill in for Cosart and start in the finale of the three-game series. Flynn was recalled from Triple-A New Orleans on Tuesday when right-hander Jacob Turner was designated for assignment. Flynn pitched once for the Marlins this season, allowing two runs in three innings June 27 against Oakland.
Pirates: Right-hander Edinson Volquez (8-7, 3.91) is 5-0 with a 1.99 ERA in six career starts against the Marlins and looks to snap his three-start winless streak, which comes on the heels of a four-start winning streak.
Copyright 2014 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.