CINCINNATI (AP) -- Matt Adams emerged from his deep slump and saved the St. Louis Cardinals from another costly loss.
Adams broke an 0-for-17 slump and hit a pair of homers in extra innings on Wednesday night, the last one in the 16th for a 5-4 victory over the Cincinnati Reds that protected the Cardinals' hold on second place in the NL Central.
''My rhythm's been off a little bit, and that was causing me to chase pitches, but I felt pretty good tonight,'' Adams said.
So did the rest of the Cardinals, who piled out of the dugout triumphantly after finally pulling it out in 4 hours, 50 minutes. The 16-inning game matched their longest of the season.
And it was so much better than being on the other side. The Reds' longest game of the season ended in one of their greatest disappointments.
''For sure,'' Reds starter Bronson Arroyo said. ''Definitely. When you play that many innings and have a couple of runners in scoring position ...''
The Cardinals had dropped the first two games in the series, letting the Reds get within a game and a half for second place. They conclude their season series on Thursday. St. Louis leads it 11-8.
Carlos Martinez (2-1) escaped a threat in the 15th, when Shin-Soo Choo singled and reached third on a sacrifice and a groundout. Chris Heisey came to bat and saw Matt Carpenter playing back at third base, so he decided on his own to try to bunt for a single.
Heisey missed the pitch, Choo reacted and took off and was easily out at the plate.
''You're not going to try a safety bunt with two outs,'' manager Dusty Baker said. ''Heisey thought the third baseman was back, he was bunting for a hit. Choo was going to try to score.''
Cincinnati's three, four and five hitters - Joey Votto, Jay Bruce and Heisey - were a combined 0 for 19.
Given the reprieve, the Cardinals pulled it out.
They've dropped five of seven overall, costing them precious ground in the division's three-team race. The Pirates, Cardinals and Reds are all in good shape to make the playoffs - one as a champion, the other two as wild cards.
''That was just a character win,'' manager Mike Matheny said. ''The guys just kept grinding, not giving up or giving in. The job the young bullpen did holding them down was impressive. That's one of those wins you don't forget.''
St. Louis wasted a chance to put it away in the 14th inning.
Adams broke his deep slump by leading off with homer off Alfredo Simon. Speedy Billy Hamilton helped the Reds tie it with another stolen base in the bottom of the inning.
Hamilton ran for Ryan Ludwick after his single off Edward Mujica, who blew a save chance for only the third time in 38 chances. Hamilton stole second - he's 2 for 2 against catcher Yadier Molina - and scored easily on Zack Cozart's single.
Carpenter had three hits and a walk, scoring twice. Carpenter has five of the Cardinals' 14 hits in the last two games.
Arroyo broke with his history of subpar showings against the Cardinals. It was his 38th career start against St. Louis - more than against any other team - and he didn't have a lot to show for it, going 0-3 against the Cardinals this season and 8-16 in his career.
He went seven innings and allowed three runs - two earned - giving the Reds chances that they squandered.
St. Louis scored twice in the fourth, when Matt Holliday hit a sacrifice fly and Carlos Beltran came around on a throwing error by Votto on Allen Craig's grounder.
Craig sprained his left foot while rounding the base on the play and left the game. X-rays were inconclusive. He's heading back to St. Louis for more tests.
''Any time you're sending Allen Craig away it's not good news,'' Matheny said.
Brandon Phillips led off the fifth with his 18th homer, giving him 100 RBIs. He's the first Reds second baseman to reach the mark since Hall of Famer Joe Morgan drove in 111 in 1976, when the Reds swept the Yankees for their second straight World Series championship.
Notes: RH Jake Westbrook felt good a day after he threw in the bullpen. Westbrook has been sidelined since Aug. 22 with a strained lower back. He's eligible to come off the DL on Friday. Matheny isn't sure whether he'll use him as a starter - as Westbrook prefers - or out of the bullpen when he returns. ... Carpenter leads the NL with 169 hits and 15 three-hit games. ... Arroyo tied a Reds record with three sacrifice bunts. ... LH Tony Cingrani (6-3) starts the final game of the series for Cincinnati. He went on the DL after leaving a game Aug. 20 with a strained lower back. RH Lance Lynn (13-9) starts for St. Louis. He's 3-0 in four starts against the Reds this season.
Follow Joe Kay on Twitter: http://twitter.com/apjoekay