PITTSBURGH -- The Ballad of Jason Grilli continued as a blues dirge at PNC Park on Thursday, when the Pirates at least survived to change the ultimate tune.

Three innings after Grilli surrendered a game-tying ninth-inning homer, Russell Martin walked with two outs and the bases loaded to give the Bucs a 4-3 win over the Reds.

The walk from lefty Tony Cingrani on a 3-1 pitch forced home Gaby Sanchez, whose one-out single was the inning's only hit. The Pirates loaded the bases as Josh Harrison was given an intentional walk and Clint Barmes was hit by a pitch.

Cingrani did not feel his ultimate pitch was a ball. Frankly, neither did Martin.

"I think we got a fortunate call on that 3-1 pitch, but it's nice to have a call go our way once," said Martin, who did not start, but entered the game defensively in the 10th inning.

The nicest thing about it was bringing an end to the Pirates' three-game losing streak -- and four straight losses in one-run games -- which was a soothing balm after another blown Grilli save.

Devin Mesoraco had stunned Grilli with his homer with one out in the ninth inning, adding the Pirates closer to those skeptical about lightning never striking the same place twice ... or four times.

Mesoraco is from Punxsutawney, and Grilli feels trapped in his personal Groundhog Day. He has given up four homers this season, in sets of two in the same series: to Ryan Braun in back-to-back April games, and now to two Reds in three days, Todd Frazier's Tuesday game-winner having preceded Mesoraco's blow.

"[Another] hanging slider that stayed up and stayed in the middle," said Pirates manager Clint Hurdle, who, for the first time, hinted that a change of closers will at least be considered. "We always huddle up after games. The coaches are involved, [general manager Neal Huntington] ... and we'll make a decision."

For the third time in four starts, Jeff Locke had departed with a lead, and he remains winless. The fourth was a 1-0 loss to Milwaukee.

Locke held the Reds to three hits and a pair of sacrifice flies, walking one and fanning two in six innings, then was given the hook by a 35-minute rain delay in the bottom of the sixth. Tony Watson and Mark Melancon followed by putting up a zero each. Grilli, however, couldn't put the final nail into what would've been the Locke's first win since Sept. 12, 2013.

The early hitting highlight was Pittsburgh's man of the moment, Gregory Polanco. In addition to stretching his record-setting hitting streak to nine games, Polanco was the centerpiece as the Pirates rallied to a 3-2 lead with three runs in the fifth.

Polanco got the Pirates' first hit off Homer Bailey -- a single in the fourth -- and his infield single furthered that fifth-inning rally. The hits represented Polanco's fifth multihit effort in those nine games.

Polanco is the first Pirates rookie in club history to open his career with a nine-game hitting streak, and he shows no signs of slowing down -- a very apt portrayal, considering his speed on the basepaths.

Polanco already owned the distinction of being the first to get a hit in each of his first eight games -- Roberto Clemente and Zip Collins had shared the old club record of seven -- but Spencer Adams also began his career with an eight-game hitting streak in 1923, albeit wrapped around four other games in which he did not bat. Polanco's nine-game overture now stands apart.

"I didn't even know about that," Polanco smiled. "So I'm very proud of myself. I know [Clemente] is someone very special for the city and for the Pirates. What I'm doing now, it's how I always try to play."

"It's special," Hurdle said of Polanco's feat. "It just gives you goosebumps when you hear, 'Not since Clemente.' Somebody drops that on you, it gets your attention."

There was plenty of two-out lightning, both celestial and earthy. The downpour that delayed the game came with two outs and the bases loaded in the bottom of the sixth -- an inning after the Bucs had balked at the possibility of a fourth straight loss by scoring three runs with two outs.

They trailed, 2-0, and had runners at the corners with two outs when Bailey held onto the ball at the end of his windup. The balk scored one run and led to two others, on RBI singles by Starling Marte -- extending his own hitting streak to 10 games -- and by Andrew McCutchen.

Barmes had four of the Pirates' 12 hits, his eighth career four-hit game, and first since May 30, 2009, with the Rockies.