Charlie Morton delivered a crucial RBI single while allowing two runs in seven innings, providing the necessary lift for the Pirates to beat the Marlins, 4-2, at PNC Park.
Rain delayed the first pitch by 36 minutes, and the Marlins never were able to get on good footing all night.
"You can't give these guys extra chances," Marlins manager Mike Redmond said. "We can't give these guys extra bases and give them runs like that. You can't do that on the road, especially against good teams."
Andrew McCutchen added a home run for the Pirates, who have now taken the first two of the series at PNC Park.
Miami has dropped four straight and looks to salvage the finale on Thursday afternoon behind rookie phenom Jose Fernandez.
In a pitching rematch from July 27 at Marlins Park, Morton came out on the winning end against Miami. But the Pirates' veteran was a bit sharper on Wednesday, compared to at Marlins Park, where he allowed four runs (three earned) in five innings.
"I give up two runs, and that's not what I want," Morton said. "You don't want to put anything on the shoulder of anybody else, I want to go out and do my job. And when I don't, it's frustrating. But I have trust and faith in the guys in the clubhouse. They've been amazing all year."
In seven innings, Morton struck out five and didn't walk a batter.
"He looked a lot better today than he did at our place," Redmond said. "He threw a lot of fastballs. He threw some pitches to keep us in check, and he made some big pitches when he needed."
For the second straight night, the Marlins allowed an early multi-run lead to slip away. They did so in sloppy fashion in the fifth inning, as the Pirates scored twice to take a 3-2 lead.
In the inning, Koehler was charged with two wild pitches, including a fastball that breezed past Starling Marte's head as he squared to squeeze bunt. The ball went to the backstop, allowing the go-ahead run to score.
"You give them a chance, and they're going to capitalize on it," Koehler said. "That fifth inning, it wasn't necessarily anything they did. Leadoff routine single. Then you've got a hit batter. You get two wild pitches, you do that against a good, quality team, they're going to score runs on you."
From the start, the inning had the makings of a mess.
Koehler got into an immediate bind, surrendering a leadoff single to Garrett Jones. Jordy Mercer was hit by a pitch, and a wild pitch advanced both into scoring position. Pittsburgh pulled even at 2 on Morton's opposite-field single. The wild pitch while Marte was at the plate brought home the decisive run.
"He got excited, kind of during that fifth inning," Redmond said of Koehler. "I think he got out of his game plan. He got a little excited, a little up in the zone, and tried to overpower guys.
"It's a learning experience for him, I think. Control his emotions in big situations. We had some trips to the mound there. We couldn't get on the same page. Maybe we showed some of our youth."
Koehler (3-7) worked five innings, and he struck out a career-high eight. Twice previously this year, he fanned seven, with the most recent on July 22 at Colorado.
"I think of that fifth, it was just kind of a product of trying to do too much," Koehler said. "I give up that leadoff hit on a good quality fastball in. Instead of just pitching and attacking the way I did the rest of the day, I was trying to make that perfect pitch. I was trying to get that ground-ball double play and trying to get us back into the dugout as fast as possible. That was on me, not staying within myself, and trying to execute every pitch."
Pittsburgh added an insurance run in the eighth inning on Pedro Alvarez's sacrifice fly off A.J. Ramos.
During their four-game losing streak, the Marlins have scored just eight runs.
In the first inning, Christian Yelich singled to open the game, and the rookie was stranded at third. The Marlins didn't have another serious threat until the fourth inning. This time, they cashed in with two runs. Giancarlo Stanton singled to open the inning, and a double by Logan Morrison put runners on second and third with no outs. Donovan Solano floated an RBI single into short right field.
With runners on the corners, Adeiny Hechavarria bounced into a 4-6-3 double play, but Morrison scored on the play.
"We're having a tough time right now stringing together some hits," Redmond said. "If we get a couple of guys on, it seems like we hit into a double play or line out. We've had some good at-bats. We're just not able to string anything together.
"We're piecing together one run here. We had a chance to maybe have a big inning. We scored a couple of runs and then hit into a double play. Believe me, it's very frustrating. I'm as frustrated as the guys are. We've just got to keep plugging along, and hopefully we'll have that day we can string together some hits and score a bunch of runs."