PITTSBURGH (CBSMiami/AP) — The Marlins’ bats cooled off Wednesday night and the team could never get on track with Tom Koehler on the mound as the Fish lost their fourth straight game, 4-2 to Pittsburgh.

Koehler allowed two hits, hit a batter and threw two wild pitches in allowing the tying and go-ahead runs to score during that inning of the Pittsburgh Pirates’ 4-2 victory over the Miami Marlins on Wednesday night.

“It’s tough to judge (his outing) right now because I’m still a little aggravated about the fifth,” Koehler said. “To allow two runs and make the team fight back? You’ve got to be able to shut it down, slam the door there. You give them a chance and they’re going to capitalize on it. They didn’t necessarily score their two runs as much as I gave them to them.”

The eventual winning run came sprinting home when Koehler’s pitch to Starling Marte almost struck Marte in the face as he squared around to bunt on a safety squeeze.

Marte went down hard, and as the ball went to the backstop he jumped up to get out of the way as Jordy Mercer ran in from third.

Koehler (3-7) allowed four hits and a walk in five innings. The rookie was the losing pitcher the previous time Pirates starter Charlie Morton beat Miami less than two weeks earlier.

“He looked OK early but he got excited in that fifth inning,” Marlins manager Mike Redmond said. “He got away from the game plan, tried to overpower guys up in the zone, which isn’t his game It was a learning experience for him. It seemed like we had several trips to the mound and couldn’t get on the same page. I think we showed some of our youth in that regard.”

Christian Yelich had two hits for Miami, which has lost four in a row and scored eight runs in that span.

“We’ve had some good at-bats but we’re not stringing them together,” Redmond said. “We’re piecing together one run here or one run there. Believe me, it’s very frustrating. I know our guys our frustrated. You’ve got to keep plugging along and hopefully have that day where we string a bunch of hits together.”

Morton (4-3) shook off a shaky beginning to retire his final 11 batters over seven strong innings despite allowing six hits over his first three-plus innings.

“He’s got pitches to get outs and to get on a roll,” Pirates manager Clint Hurdle said. “We’ve seen it in the past. The challenge in front of Charlie is consistency.”

The Marlins had a single during each of the first three innings against Morton, and they took a 2-0 lead when they opened the fourth inning with three consecutive hits. Donovan Solano drove in Giancarlo Stanton with a bloop single over Neil Walker’s head for the game’s first run.

But conceding Miami’s second run was a trade-off Morton and the Pirates were willing to make. Logan Morrison scored when Adeiny Hechavarria followed by grounding into a double play.

“He’s capable of getting two outs with one pitch with somebody on base more than anyone we have,” Hurdle said.

“I do think that did give him a boost of confidence going into the rest of the game.”

Morton did not allow any of the remaining hitters he faced to reach base.

“Initially, I give up two runs, and I don’t want to give up runs,” Morton said. “I don’t want to put anything on the shoulders of anyone else — I want to do my job. So when I don’t and I give up runs, that’s frustrating. But I have trust and faith in the guys in this clubhouse; they’ve been amazing all year. It’s a lot of fun to watch.”

Morton, who also had an RBI single, did not walk a batter and had five strikeouts in allowing two runs on six hits. Justin Wilson pitched a perfect eighth, and Mark Melancon was aided by Walker’s catch on Stanton’s line drive in earning his seventh save.

Second baseman Walker went to his right to stab a ball that was heading up the middle, then in one motion quickly threw to first to double up Ed Lucas.

Andrew McCutchen homered for the Pirates (69-44), who have won four straight and are a season-high 25 games over .500.

With one out and no one on in the fourth, McCutchen took a 3-1 pitch to right-center for his 16th home run, the second homer allowed by Koehler in his past seven starts.

McCutchen added an infield single in the eighth, and Pedro Alvarez followed with a sacrifice fly to pad the Pirates’ lead. McCutchen, who is batting .359 at home this season, has a streak of five straight multihit games.