Lance Lynn and Carlos Beltran were National League All-Star teammates this summer.

They perhaps felt the sting of the St. Louis Cardinals' latest loss most in a game that ended nearly seven hours after the scheduled first pitch.

Ryan Braun homered off Lynn with one out in the 13th inning, and the Milwaukee Brewers outlasted the Cardinals 5-4 on Friday night. Beltran failed with runners in scoring position his first three at-bats and has just one RBI in his last 14 games.

"Well, you know what, it's just tough any way you lose a game," Beltran said. "You saw we had some opportunities to win this one and we just didn't come through as a team."

Lynn (13-7) had 12 victories at the All-Star break but was bumped to the bullpen last month and hasn't won since July 27. He hung a 1-1 breaking pitch to Braun.

"Just a bad breaking ball to the MVP of last year," Lynn said. "He did what he was supposed to do with it. Other than that I threw the ball well, but you can't make the mistake.

"I made the wrong pitch to the wrong guy at the wrong time."

Beltran is in an 0-for-13 slump. He missed two games this week because of soreness in his left knee and said after the game that he has also battled renewed soreness in his right hand.

"It's bothering me," Beltran said. "What can I say? My time will come. When it's going to be? I don't know. I know that it will come."

Braun's shot gave him his fifth straight 100-RBI season and further frustrated the few hundred fans still around for the finish.

"The last thing we want to do is go out there and lose a game," Beltran said. "It didn't happen, so we've got to come and get 'em tomorrow."

Make that tonight.

The start was delayed by rain for 2 hours, 20 minutes, long enough to cause one lineup scratch. Cardinals No. 3 hitter Matt Holliday was set to return after a game out with lower back pain followed by a day off but was scratched as a precaution.

Braun set a franchise record for 100-RBI seasons, breaking a tie with Cecil Cooper and Prince Fielder, with his 199th career homer. He hit a 1-1 pitch from Lynn (13-7) into the mostly empty left-field stands.

Lynn was a first-time All-Star with 12 wins at the break but was bumped to the bullpen in late August.

Brandon Kintzler (1-0) got cleanup hitter Allen Craig to ground into an inning-ending double play in the 12th, and John Axford finished for his 26th save in 34 chances. The Brewers have won 10 of 13 to climb into the fringe of the NL wild card race.

Both starting pitchers, St. Louis' Kyle Lohse and Milwaukee's Yovani Gallardo, failed much earlier in their second attempts to reach 15 wins.

The Cardinals got a pair of one-out walks in the 12th against Kintzler and left the bases loaded in the 11th against Kameron Loe, but couldn't score and fell to 3-10 in extra innings.

Yadier Molina's two-run homer off Jim Henderson tied it at 4 with two outs in the eighth. It was his 18th shot of the season and first since Aug. 24.

The drive answered the Brewers' two-run eighth. Corey Hart scored the go-ahead run from second on an infield hit combined with shortstop Daniel Descalco's throwing error.

Jon Jay had three singles and a steal for the Cardinals, who have the lead for the second NL wild card spot, but are 2-2 on a six-game homestand. Jay is batting a major league-best .390 (46 for 118) since Aug. 6, and Molina is batting .385 (20 for 52) against Milwaukee with three homers and eight RBIs.

The Brewers' Martin Maldonado ran into a big out to end the top of the 11th, trotting to first while admiring a drive to left center off Fernando Salas that didn't make it out. He was thrown out at second by left fielder Adron Chambers.

Gallardo finished strong with four of his six strikeouts in his final two innings in a rare acceptable outing against the Cardinals. The Milwaukee ace is 1-9 with a 6.72 ERA for his career against St. Louis.

Lohse, who allowed two runs and five hits in 6 1-3 innings, kept alive an eight-game winning streak over his last 14 starts.

Pinch-hitter Travis Ishikawa, who had been 1 for 12 against St. Louis, tied it at 2 in the seventh with an RBI double off Edward Mujica.

NOTES: The time of game was 4:30. ... Cardinals closer Jason Motte worked the ninth and 10 innings. He allowed a hit and struck out two in his fifth two-inning outing of the season, all at home. ... Mujica has allowed just four of 22 inherited runners to score, and has worked 16 scoreless innings in 17 appearances since being acquired from Miami. ... Lohse is 14-2, the second-best start in franchise history trailing only Ted Wilks, who was 14-1 in 1944 and finished at 15-2. ... Brewers 3B Aramis Ramirez missed his second start with a back injury but could be back Saturday.