Updated

The Chicago Cubs were in big trouble when rookie Lendy Castillo hit Rickie Weeks and Ryan Braun to open the 13th inning, and Corey Hart made them pay.

Hart hit an RBI single in the 13th inning to give the Milwaukee Brewers an 8-7 victory on Friday night.

With the bases loaded and no outs, Hart sent Castillo's first pitch back up the middle to end the game after five hours, four minutes. Castillo (0-1) plunked Weeks on the left hand and Braun in the back before Aramis Ramirez hit a flare single to right to bring Hart to the plate.

"Unfortunately, when Lendy came out, he hit a couple guys to start the inning," Chicago manager Dale Sveum said. "It wasn't in our favor to start with in that inning when he did that."

Hart also hit a two-run homer in the ninth to tie it at 7. Vinnie Chulk (1-0) pitched the final two innings for his first victory since Aug. 19, 2007, for San Francisco against the Los Angeles Dodgers.

"That was a great game," Sveum said. "Obviously, we finished on the bad end of it. We both emptied the bench and that was the way it was going to end."

The wild game featured the end of John Axford's run of 49 consecutive saves for the Brewers, the fourth-longest streak in major league history. There were 14 walks by Cubs pitching, none of them intentional.

Milwaukee ran out of position players and had to use starter Zack Greinke as a pinch hitter in the 11th with the potential winning run at second. The right-hander hit into an inning-ending double play.

"There was a lot going on," Brewers manager Ron Roenicke said. "A lot of really good things, quite a few not so good things on both sides. It was an interesting ballgame. I didn't know what was going to happen."

David DeJesus delivered a pinch-hit grand slam in the seventh, giving the Cubs a 4-1 lead. Jonathan Lucroy hit a three-run double as the Brewers responded with four runs in the bottom half.

Milwaukee led 5-4 before Chicago got to Axford for three runs in the ninth. DeJesus hit a tying triple with one out, driving in Ian Stewart and stopping Axford's streak. DeJesus then scored on a wild pitch that struck out Starlin Castro, but bounced a couple feet in front of home plate, off catcher Lucroy and back into fair territory.

Alfonso Soriano added an RBI single to give the Cubs a 7-5 lead.

Sveum went to Rafael Dolis to try to close it out, but the rookie walked Ramirez before Hart hit a drive to left on a full-count pitch.

DeJesus' first career pinch-hit homer gave the Cubs the lead in the seventh, and the Cubs bullpen gave it right back.

Carlos Marmol walked Braun and allowed an RBI double to Ramirez. He then had a 1-2 count on Hart when he had to leave the game due to a strained right hamstring.

Sveum said Marmol would return to Chicago for an MRI, and said the reliever might have to go on the disabled list.

Michael Bowden then loaded the bases, and Lucroy's hit gave Milwaukee the lead again.

Milwaukee starter Randy Wolf pitched six scoreless innings, giving up six hits. He struck out five and walked three.

Chicago starter Matt Garza pitched five innings, giving up one run and three hits. He walked five and struck out three.

Garza was pitching on 11 days' rest after missing his last start due to flulike symptoms.

"Five innings isn't what I signed up for," Garza said. "I still hold myself higher than that. I found a way to get through it but having my team carry out the last seven innings isn't something to be proud of."

NOTES: DeJesus' first career grand slam was on June 15, 2008, against Arizona when he played for Kansas City. ... It was the Cubs' first pinch-hit grand slam since Mike Fontenot on May 7, 2010, at Cincinnati. ... Castro has a 10-game hitting streak. ... Axford's streak only counted regular-season games. He did blow a save in Game 5 of the NL division series against Arizona last year. ... The record for consecutive saves is 84 by Eric Gagne of the Los Angeles Dodgers from Aug. 28, 2002 to July 3, 2004. Tom Gordon is second at 54 games and Jose Valverde is third at 50 games.