PITTSBURGH (AP) — Far from dazzling, Jeff Locke pitched well enough to get a rare victory.

Locke won for only the second time in three major league seasons, and the Pittsburgh Pirates beat the Reds 3-1 Saturday night as Cincinnati starter Johnny Cueto left in the fifth inning with a strained right triceps.

After striking out Pedro Alvarez starting the fifth, Cueto threw a first-pitch strike to Travis Snider then began shaking his right arm. A Reds trainer visited Cueto on the mound, briefly massaged the pitcher's upper arm, and both then walked to the dugout.

"I believe when I threw a changeup to Alvarez that I felt something in my arm," Cueto said. "It's disappointing. I felt really good. I thought I was pitching really good and I wanted to stay in that game."

Cueto helped Cincinnati win the NL Central last season, then left the division series opener against San Francisco with an oblique strain that knocked him out for the rest of the series, won by the Giants in five games.

Cueto allowed one run and two hits in 4 1-3 innings with one walk and three strikeouts. He has given up just seven earned runs in his last seven starts in Pittsburgh.

Cueto is scheduled to return to Cincinnati on Sunday to be examined by team doctors.

"The good thing is that it isn't the elbow and it isn't the shoulder," Reds manager Dusty Baker said. "It's in the belly of the triceps so, hopefully, he'll be OK."

Alfredo Simon (0-1) relieved Cueto with the score 1-1. Snider reached on an infield single, Clint Barmes singled and Starling Marte singled with two outs to drive in the go-ahead run.

Pinch-hitter Jose Tabata added an RBI double off the right-center field fence in the seventh against J.J. Hoover.

Locke (1-1), making his 14th big league appearance and 12th start, allowed one run, four hits and four walks in five innings with no strikeouts. His first win was last Oct. 1, when he pitched six innings of one-run ball to beat Atlanta.

"I had a hard time trying to find the strike zone," said Locke, who has a 2-7 career record. "I got them to hit some balls on the ground when I needed to and I was fortunate to have some good defense behind me."

Pittsburgh manager Clint Hurdle liked the way Locke was able to minimalize damage.

"He competed and somehow he was able to get the big outs when he needed them," Hurdle said.

Mark Melancon pitched a 1-2-3 eighth and has not allowed a run in seven games and seven innings this season. Jason Grilli finished for his fifth save in as many chances.

"I'm not counting the saves," said Grilli, getting a chance to be a closer for the first time at age 36. "Everybody is doing their job and there is a lot of confidence in our bullpen right now."

Cincinnati has lost four in a row, its longest regular-season skid since a five-game streak last Aug. 5-9. The Pirates have won four of five following a 1-5 start.

Zack Cozart had three hits, including a double and his third homer of the season, a solo drive in the third. Andrew McCutchen walked in the fourth and scored on a two-out double by Garrett Jones, who is 7 for 14 in his last four games.

Cincinnati stranded 12 runners and was 0 for 12 with runners in scoring position.

"You've got to execute," Baker said. "Three times we had runners on second base with no outs and didn't score them. I can't stress enough how important it is to execute."

NOTES: RHP Phil Irwin is expected to be recalled from Triple-A Indianapolis and start Sunday for Pittsburgh in place of LHP Wandy Rodriguez in the finale of the three-game series in what would be his major league debut. Rodriguez said he will be unable to start after straining his left hamstring Monday while pitching at Arizona. The Reds will start RHP Mat Latos (0-0, 4.05), who is 4-0 with a 2.11 ERA in seven career starts against Pittsburgh ... Cincinnati 2B Brandon Phillips was away from the team because of what manager Dusty Baker termed a family matter and also may miss Sunday's game. INF Cesar Izturis started in Phillips place. ... Simon had his first career hit, a single off LHP Justin Wilson in the sixth. ... Cincinnati CF Shin-Soo Choo and 1B Joey Votto have reached base safely in all 11 games. ... Marte's streak of six straight games with a first-inning hit ended when he struck out. ... Pirates LHP Francisco Liriano is expected to begin an injury rehabilitation assignment with high Class-A Bradenton on Monday. Liriano, who broke a bone in his right upper arm on Christmas, is scheduled to pitch three innings and be on a 50-pitch limit. ... Alvarez was 0 for 2 and is batting .086 with 15 strikeouts in 35 at-bats.