PITTSBURGH (AP) -- A.J. Burnett walked into the Pittsburgh Pirates dugout after falling two runs down to the Cincinnati Reds in the second inning Saturday night when his catcher decided it was time for a little pep talk.
''I told him 'That's all we're giving up today' and he said 'Yes sir,''' Russell Martin said. ''That's his attitude. If you give up a couple, it's not the end of the world. If you give up a couple, you've got to keep going out there, keep grinding.''
Something the veteran ace and his resilient club do better than just about anyone else in baseball.
A night after a stunning ninth-inning collapse, Pittsburgh responded behind Burnett, who scattered four hits in seven strong innings to lift the Pirates to a 4-2 win and a one-game lead over the Reds for the top spot in the NL wild-card race.
''Go out, it's a big game, it's a big series, you want to attack,'' Burnett said. ''We were able to do that and get through seven somehow. I felt like I got stronger as it went on.''
Burnett struck out a season-high 12 against three walks and became the first right-hander in the 126-year history of the franchise to top 200 strikeouts in a season when he fanned Joey Votto in the sixth.
''I was just focused, I was locked in,'' Burnett said. ''It was probably the best command of that hook I've had in a long time. I had a put-away pitch tonight, and it's lot different when you have those.''
Jason Grilli worked the ninth for his 31st save, his first since going to the disabled list with a strained right forearm in July. Martin slugged a two-run homer, and Jose Tabata added two hits for the Pirates.
Zack Cozart hit his 12th home run of the season for Cincinnati, and Ryan Ludwick added an RBI but Homer Bailey (11-11) lost his first decision since July 26.
''The story of the game is we didn't score enough runs,'' Reds manager Dusty Baker said. ''We just couldn't get much going against (Burnett). We got some runs early, then he settled down.''
The Reds rallied for a 6-5 win in 10 innings on Friday, turning three unearned runs in the ninth and Votto's solo homer in the 10th into a tie with the Pirates in the race for home field in the wild card round.
It was the second gut-punch loss by the Pirates in three days. In danger of falling behind the Reds in the standings for the first time in since June 20, Pittsburgh reduced its magic number to three behind Burnett and a bullpen that regained its composure after a pair of potentially confidence-shaking meltdowns.
Reliever Justin Wilson induced a double play to get out of the eighth, and Grilli - an All-Star this summer after racking up 29 saves in the season's first half - looked like his old self while working around Ludwick's leadoff single in the ninth.
''I'm just a competitor,'' Grilli said. ''I want the ball. I want to participate. Watching these guys do it for so long made me want to come back and do it with him. It was a big win, obviously, and a lot of fun to be out there.''
Bailey wasn't quite as sharp. Making his first start at PNC Park since throwing a no-hitter at the Pirates last September, Bailey was solid but not spectacular. An off night by Cincinnati's typically reliable defense didn't help.
Alvarez reached with two outs in the third when Votto mishandled a slow chopper to first. Martin followed by taking a fastball from Bailey and sending it into the bleachers in left field to tie it at 2.
Pittsburgh broke the tie in the sixth. Andrew McCutchen walked with one out and sprinted to third when Bailey's attempted pickoff throw slipped past Votto and rolled to the wall. Justin Morneau walked to put runners on the corners, and Marlon Byrd hit a sacrifice to deep center field to give the Pirates the lead. Bailey gave up four runs, two earned, and three hits with four walks and three strikeouts.
''The loss is on me,'' Bailey said. ''I had the throwing error at first base, I didn't execute very well, I made a couple of bad pitches. (The offense) gave me a couple of runs to work with early and I didn't take advantage of it. I gave them all back and then some.''
Reliever Zach Duke - who spent six years in Pittsburgh during the club's two-decade losing streak - came on after Byrd's sacrifice fly and immediately surrendered an RBI single to Alvarez that gave the Pirates a two-run cushion.
NOTES: Cincinnati CF Shin-Soo Choo sat out after injuring his right hand while sliding into first base on Friday. Baker said he wasn't sure when Choo will return. ... Cincinnati rookie OF Billy Hamilton will make his second start of the season on Sunday. The base stealing specialist went 3 for 4 with four stolen bases in his previous start against Houston on Wednesday. ... The series concludes on Sunday when Pittsburgh's Jeff Locke (10-6, 3.27 ERA) faces Cincinnati's Bronson Arroyo (13-11, 3.56).
Follow Will Graves at www.twitter.com/WillGravesAP