CHICAGO — The Chicago Cubs had a division rival lose on a ball that got away from the catcher on Wednesday night.

Then, about an hour later, the Cubs increased their NL Central lead the same way.

Javier Baez scored on a wild pitch in the bottom of the ninth to cap a wild 7-6 win over the Cincinnati Reds, in which the Cubs almost squandered a grand slam by Anthony Rizzo in the first inning and another strong start by John Lackey because of three home runs allowed by the bullpen.

Baez opened the bottom of the ninth with a double off Wandy Peralta (3-3) and pinch-hitter Jon Jay walked. Then, Ben Zobrist moved the runners with a groundout, but only after manager Joe Maddon was ejected during the at-bat.

Reliever Blake Wood came in and struck out Albert Almora Jr. But on the first pitch to Kris Bryant with two outs, Wood threw a breaking pitch that got away from catcher Tucker Barnhart, ending the game.

"Tuck (Barnhart) does an awesome job back there," Wood said. "He did everything that he could, but I just yanked it a little bit too far."

Afterward, the Cubs were 1 1/2 games ahead of Milwaukee and 2 1/2 ahead of the St. Louis Cardinals, who lost in similar fashion in Boston as catcher Yadier Molina couldn't handle the decisive play at the plate.

"It doesn't matter how you do it, as long as you get that win," Cubs catcher Alex Avila said. "It's exciting because when moments like today happen, you win a game of that variety, you're not only excited for that, but obviously it means something as well."

Cincinnati's Joey Votto had his streak of reaching base at least twice in a game come to an end. Votto did reach once but he fell one game shy of tying Ted Williams' record of 21 straight games.

Wade Davis (3-1) pitched a perfect ninth, redeeming the bullpen, which surrendered a five-run lead.

The third grand slam of Rizzo's career came after both teams loaded the bases with their first three batters of the game.

The Reds managed just one run in the top of the first, while Rizzo regained the lead for Lackey with an opposite field blast, his 28th of the season.

Cincinnati put on seven baserunners in the first two innings against Lackey, but got just the one run in his six innings.

Lackey allowed one baserunner over his final four innings, retiring the final 10 without allowing a ball out of the infield. He had six strikeouts and walked three. Lackey is 5-0 with a 3.06 ERA since the All-Star break after going 5-9 with a 5.20 ERA in the first half. He was trying for a career-best sixth straight win.

Lackey also caught Reds starter Homer Bailey not paying attention to him on the bases for his first career steal in the fourth inning after he singled. He was later picked off second base after straying following a walk by Zobrist.

"When I got the hit, (first base coach Brandon Hyde) was like, 'Do you want to steal a base?' because of how they were playing and I was like, 'Heck no, I'm tired,'" Lackey said. "But then after the first pitch, nobody was really watching me and I thought it was pretty easy, so I just went ahead and went."

Added Maddon: "It was cute, until he got picked off second."

"I made two bets," Lackey said. "One worked, one didn't."

Bailey allowed six earned runs in 5 2/3 innings, waking five and striking out 10.

Phillip Ervin became the first Reds player since Juan Francisco in 2009 to homer on his first career hit when his solo shot off reliever Hector Rondon made it 6-2 in the seventh inning.

Two batters later, Zack Cozart's home run off Rondon made it 6-4, forcing Maddon to insert Brian Duensing in the game. He got Votto to ground out, ending the rally and Votto's chance at history.

Votto singled in the first but took Lackey to the warning track in the third inning before the pitcher snared a line drive up the middle in the fifth inning to retire the first baseman.

"He's tough to pitch to," Lackey said of Votto, who left Wrigley Field without speaking to the media. "He's one of those guys where you hold him to a single and you call it a win."

Votto would have led off the 10th if the game had gone extra innings.

Adam Duvall, a pinch-hitter, took the second pitch from reliever Carl Edwards Jr. into the bleachers to make it 6-6 in the eighth inning.

STREAKY SCHWARBS

Kyle Schwarber reached base in his first three plate appearances, bringing his streak to eight before striking out in the seventh inning. He had struck out in his eight previous at-bats before the streak.

EYE FOR TALENT

Longtime Reds scout Gene Bennett died Wednesday, the team announced. He was 89.

Bennett's signings included Don Gullett, Chris Sabo, Barry Larkin and Paul O'Neill. He joined the Reds in 1952, signing as a player, and retired from the front office in 2011.

TRAINER'S ROOM

Reds: RHP Robert Stephenson (bruised right shoulder) was scheduled to return to the rotation against the Braves on Saturday in Atlanta. He returned from the disabled list on Sunday in Milwaukee and pitched two scoreless innings against the Brewers out of the bullpen. ... OF Scott Schebler (strained left rotator cuff) went 0 for 2 with a walk as a DH in his first game on a rehab assignment with Triple-A Louisville on Tuesday and then had two hits on Wednesday. Reds manager Bryan Price said Schebler reported "no issues whatsoever" after Tuesday's game.

Cubs: RHP Koji Uehara (neck strain) threw a bullpen session on Wednesday and is scheduled to throw another on Friday or Saturday. He has been on the 10-day disabled list since Aug. 9.

UP NEXT

The teams will close the four-game series Thursday afternoon at Wrigley Field with LHP Jon Lester (8-7, 3.99 ERA) pitching for the home team against RHP Scott Feldman (7-7, 4.43).