MILWAUKEE -- Carlos Beltran's sacrifice fly drove in the winning run as the St. Louis Cardinals beat the Milwaukee Brewers 7-6 in 10 innings on Friday night at Miller Park.
Wtih the score tied 4-4 going into the ninth inning, the Cardinals took a two-run lead on Matt Adams' 15th homer of the season.
Milwaukee came back in the bottom of the inning when Jeff Bianchi scored on an RBI single by pinch-hitter Logan Schafer. Edward Mujica loaded the bases, giving way to John Axford, and the Brewers tied it when Norichika Aoki scored after Daniel Descalso couldn't field Aramis Ramirez's weak grounder to third.
Axford (7-7), who was traded from Milwaukee to St. Louis last month, recovered and preserved the tie by getting Carlos Gomez to ground into an inning-ending double play.
Brewers right-hander Michael Blazek (0-1), acquired in exchange for Axford, gave up a leadoff walk to pinch-hitter Kolton Wong and a double to Matt Carpenter, bringing up Beltran.
Carlos Martinez threw a perfect ninth for his first save of the season.
Ramirez went 3-for-4 with five RBIs for Milwaukee and Adams finished the day 3-for-5 with three RBIs and a run for St. Louis, which moved two games ahead of the Pittsburgh Pirates and Cincinnati Reds in the National League Central.
Brewers starter Johnny Hellweg again struggled with command, walking five and giving up seven hits but only allowing two runs in his five-inning start.
Shelby Miller gave up four runs, seven hits and two walks while striking out four.
Carpenter drew a leadoff walk and scored in the first inning to give the Cardinals an 1-0 lead.
Milwaukee came back in the bottom of the first to take a 3-1 lead on Ramirez's 11th home run of the season and his first since Sept. 6.
Double plays bailed out Hellweg in the third and fourth.
After the Cardinals drew within a run and loaded the bases in the fifth, Hellweg jammed Yadier Molina with a 2-0 fastball and he hit a bouncer to second that the Brewers turned into another inning-ending double play.
NOTES: Brewers SS Jean Segura was out of the lineup again, still recovering from a strained right hamstring. Manager Ron Roenicke said he would not play Segura for the rest of the season if the injury doesn't progress, but he didn't see that being an issue. ... Brewers OF Khris Davis, dealing with a sore left wrist, also did not start but was available to pinch hit. ... Cardinals manager Mike Matheny moved Beltran up to the No. 2 spot in the lineup in an effort to snap a mini-slump. Beltran was 6-for-37 in his 10 previous games, dropping his average from .308 to .297.