PITTSBURGH — Josh Harrison swung at the first pitch with the game on the line and popped out. Yet he refused to second-guess himself.

Jose Peraza’s sacrifice fly snapped a ninth-inning tie and lifted Cincinnati to a 4-3 victory over the Pirates on Friday night, snapping the Reds’ five-game losing streak and giving them just their third win in 12 games.

Andrew McCutchen pulled the Pirates into a tie in the bottom of the eighth with a sacrifice fly off Raisel Iglesias (3-1). Iglesias hit the first two batters in the ninth with pitches but escaped a bases-loaded jam by getting Harrison to pop up and pinch-hitter Adam Frazier to fly out.

“He threw me a slider and I thought it was a pitch I could drive,” Harrison said. “I just got under it. If I hit it another half-inch or so on the bat, it could have been a sacrifice fly and we win the game. I wasn’t upset about it. It was a hittable pitch and I didn’t get the job done.”

The Pirates lost for the ninth time in 11 games as they continue to fade from the National League wild card race.

Eugenio Suarez hit a leadoff single off closer Tony Watson (2-5) in the ninth, advanced to second on Ramon Cabrera’s sacrifice bunt, took third on Tyler Holt’s single and scored on Peraza’s liner to center field.

“It just shows you that we don’t give up,” Reds second baseman Brandon Phillips said. “We try to win every game. We’re in a lot of games, but we just don’t finish. But today, we got to finish and it really shows that we have a heart.”

Joey Votto had three hits for the Reds, Suarez had two and Phillips hit his 10th home run, a leadoff shot in the seventh off Jared Hughes that put Cincinnati ahead 3-2.

Gregory Polanco had three hits, including two doubles, for the Pirates.

Harrison and Jordy Mercer added two hits each. Harrison extended his hitting streak to nine games with an RBI double in the third that drew the Pirates into a 1-1 tie. He scored on McCutchen’s sac fly after leading off the eighth with a single.

The Pirates left eight runners on base, went 1 for 11 with runners in scoring positon and had two runners picked off by rookie starter Tim Adleman.

“We had a chance to move runners, score runners from third with less than two outs and we didn’t get it done,” Pirates manager Clint Hurdle said. “We’re having problems scoring runs. I don’t think the execution level matches the talent level right now.”

Adleman allowed two runs and seven hits in six innings with three walks and no strikeouts. He had two hits, doubling in the third inning and scoring the game’s first run on Votto’s single. He hit an RBI single in the fourth to snap a 1-1 tie.

Pirates rookie left-hander Steven Brault remained winless in five career starts, giving up two runs and five hits in five innings while walking two and striking out two.

“Tonight was best I felt since being up here,” Brault said. “It wasn’t perfect. I made some mistakes to the pitcher, which is inexcusable, but I really felt like myself this time. I was getting ahead of the hitters, finally.”

TRAINER’S ROOM

Reds: LHP John Lamb, who made 14 starts for Cincinnati earlier this season, was originally supposed to be recalled from Triple-A Louisville on Tuesday but has been shut down for year because of a stained flexor mass in his elbow.

Pirates: RHP Gerrit Cole (elbow inflammation) threw a 32-pitch bullpen session before the game and said he is ready to be activated from the DL on Monday night and start at Philadelphia. He has been out since Aug. 25. … LF Starling Marte (back spasms) missed his fourth straight game.

HERITAGE NIGHT

As part of an African-American heritage celebration, both teams wore replica Negro League uniforms with the Reds representing the Cincinnati Tigers and the Pirates representing the Homestead Grays.

Former Pirates player personnel director Tyrone Brooks, who was hired earlier this year by Major League Baseball as senior director of its new front office and field staff diversity pipeline program, took part in pre-game ceremonies.

UP NEXT

Reds: RHP Robert Stephenson (2-1, 3.12 ERA) will make his fourth career start Saturday night and the rookie is coming off his first loss when he gave up two runs in 5 1/3 innings to the New York Mets on Monday.

Pirates: RHP Drew Hutchison (1-0, 4.97) will make his debut with Pittsburgh after being called up Tuesday from Triple-A Indianapolis, where he was 1-1 with a 4.50 ERA in seven games following his acquisition from the Toronto Blue Jays in a trade Aug. 1.