PITTSBURGH (AP) Pirates catcher Russell Martin didn't start Thursday's game. Rather, he ended it.
Martin drew a bases-loaded walk off Tony Cingrani with two outs in the 12th inning and Pittsburgh beat the Cincinnati Reds 4-3 to avoid a three-game sweep.
Cingrani's first pitch buzzed in low around the ankles of Martin, who drew boos from those left in attendance for not letting the ball hit him to score the winning run.
''I did wonder maybe if I would've got hit the game would be over,'' Martin said. ''But when it's at your feet you just react, and I just reacted.''
Later, Cingrani's 3-1 pitch caught what Reds manager Bryan Price thought was a part of the strike zone established during the game's proceedings.
Instead, it was ball four.
''I'm not saying we would have won this game,'' Price said. ''But it certainly didn't give us an opportunity to go out there and compete in the 13th.''
Cingrani (2-8) took the loss after he gave up a single to Gaby Sanchez, balked him to second, intentionally walked Josh Harrison and hit Clint Barmes with a pitch to load the bases.
Martin entered the game in the 10th and wound up walking twice.
Justin Wilson (2-0) retired the Reds in order in the top of the 12th.
Devin Mesoraco hit a solo homer in the Reds ninth off Jason Grilli, who blew his fourth save in 15 chances this season.
Grilli gave up a home run for the second time in three days, and has allowed four in 20 games this year. He gave up four homers in 54 appearances last season.
Billy Hamilton led off the game with a double against Jeff Locke, stole third and scored on a sacrifice fly by Joey Votto to put the Reds ahead 1-0. Votto doubled and scored on a sacrifice fly by Jay Bruce for a 2-0 lead in the fourth.
Locke settled down though and worked six innings in which he allowed two runs on six hits and a walk.
Gregory Polanco opened the fourth with a single for Pittsburgh's first runner against Homer Bailey and the Pirates later scored three times in the fifth. With runners at the corners and Polanco at the plate, Bailey went through his pitching motion but did not release the ball and was called for a balk.
''"It was one of those deals where you're thinking more about not falling than throwing the ball,'' Bailey said. ''My back foot slipped out from me then I land on the side of my other the foot, so it was a circus all the way around. I was just trying not to fall backward.''
Pirates manager Clint Hurdle offered that the call may have helped his hitters gain some traction against Bailey after he started with three perfect frames.
''I think that the balk call might have leaked in a little bit,'' Hurdle said. ''Whether it rattled him, I don't know, he's a pro.''
Polanco, Starling Marte and Andrew McCutchen followed with singles that scored two runs for a 3-2 Pittsburgh lead.
''They hit some balls off the end of the bat, had some balls fall in,'' Bailey said.
Price pulled Bailey in the sixth and as reliever Sam LeCure took his warmup pitches, heavy rain began to fall and there was a 35-minute delay.
The Pirates twice put runners in scoring position after Mesoraco's tying homer.
McCutchen struck out looking at an offspeed offering from Aroldis Chapman in the ninth with runners at first and second. Marte struck out swinging in the 11th in the same situation.
NOTES: Polanco's single in the fourth extended his hitting streak to nine games, the longest by any Pirates player to begin a major league career. ... Barmes finished with his first four-hit game since May 30, 2009. ... RHP Charlie Morton (4-7, 3.09) opposes Cubs RHP Edwin Jackson (4-7, 5.11) on Friday afternoon as the Pirates open a three-game series at Wrigley Field. ... RHP Mat Latos (0-0, 0.00) is slated to make his second start of the season when the Reds return home to face RHP R.A. Dickey (6-5, 4.08) and the Toronto Blue Jays.