CHICAGO — Homer Bailey pitched effectively into the eighth inning, Ryan Hanigan hit a three-run double and the Cincinnati Reds beat the Chicago Cubs 3-1 on Tuesday night to move closer to the NL Central title.

The Reds' Dusty Baker managed his 3,000th major league game, and Cincinnati reduced its magic number to four over the Cardinals to clinch the division.

Bailey (12-9) took a two-hit shutout into the eighth before Darwin Barney had his second single of the night and pinch-hitter Bryan LaHair hit an RBI double to make it 3-1. Sean Marshall then came in and hit pinch-hitter Dave Sappelt before getting a strikeout and grounder to end the threat.

Cardinals 4, Astros 1 

ST. LOUIS — Kyle Lohse threw seven scoreless innings for his 15th victory and contributed an RBI double as the St. Louis Cardinals beat the Houston Astros 4-1 Tuesday night to stay in front for the second NL wild card.

Fernando Abad (0-5) had a career-best six strikeouts in the Astros' 100th loss. They're 8-8 this month under interim manager Tony DeFrancesco and need nine wins in the final 14 games to avoid topping last season's franchise-record 106 losses.

Daniel Descalso got a key early RBI and Jon Jay had two hits and two RBIs for the Cardinals, coming off a 2-5 trip but with a favourable upcoming schedule with the next eight against lowly Houston and Chicago. With 14 games to play the defending World Series champions are 1 1/2 games ahead of the Dodgers, rained out at Washington, and 2 1/2 games ahead of the Brewers.

Marlins 4, Braves 3 

MIAMI — Jose Reyes hit a two-out RBI single in the 10th inning Tuesday night, and the Miami Marlins overcame an awful ninth inning to snap the Atlanta Braves' four-game winning streak with a 4-3 victory.

With one out in the 10th, pinch-hitter Rob Brantly was walked by Cory Gearrin (0-1), and Gorkys Hernandez was hit by a pitch. Following a strikeout, Reyes hit a blooper that fell in front of a diving Jason Heyward in right field, and Brantly scored without a play.

Atlanta lost to Miami for only the fourth time in 14 meetings.

The Braves rallied from a 3-0 deficit in the ninth to tie the game on an RBI single by Dan Uggla and a two-run double by Brian McCann off Mike Dunn to tie the score.

Dunn struck out Michael Bourn with runners at the corners to end the inning.

Brewers 6, Pirates 0 

PITTSBURGH — Yovani Gallardo gave up just two hits over 6 2-3 innings and the surging Milwaukee Brewers dropped the weary Pittsburgh Pirates 6-0 on Tuesday night.

Gallardo (16-8) struck out six and walked four to win his eighth straight decision as Milwaukee moved in front of fading Pittsburgh in the jumbled National League wild-card race. The teams entered the day 2 ½ games back of the Cardinals, who played Houston later.

Ryan Braun had two hits, drove in a run and stole three bases for the Brewers, who have won six of seven. Milwaukee's seven stolen bases were the most by the franchise since it moved to the National League in 1998. Carlos Gomez and Jonathan Lucroy had three hits apiece for the Brewers.

A.J. Burnett (15-8) gave up two runs in six innings but couldn't stop Pittsburgh's late season swoon. The Pirates are 4-12 this month.

Diamondbacks 3, Padres 2 

PHOENIX — Ian Kennedy gave up one run in eight innings for his 14th victory, Miguel Montero drove in two runs with two doubles and the Arizona Diamondbacks finally got a home win over the San Diego Padres, 3-2 on Tuesday night.

San Diego was 6-0 in Arizona this season before dropping the series opener.

Kennedy (14-11) overcame a 30-pitch first inning, scattering seven hits. A 21-game winner in 2011, Kennedy is 8-3 in his last 12 starts.

Eric Stults (6-3) gave up three runs and five hits in six innings in his first loss since June 3. The left-hander had gone 5-0 with a 2.08 ERA in seven starts since rejoining the Padres rotation on Aug. 6.

Giants 6, Rockies 3 

SAN FRANCISCO — Tim Lincecum pitched San Francisco one win closer to an NL West crown, and the Giants lowered their magic number to clinch the division to seven with a 6-3 victory over the Colorado Rockies on Tuesday night.

Lincecum (10-14) struck out six and walked two in 6 1-3 scoreless innings on a day the second-place Los Angeles Dodgers were postponed by rain in Washington.

Marco Scutaro had three singles, drove in a run and scored twice and Xavier Nady had two RBI singles for the Giants (85-63), who moved a season-high 22 games over .500. Pablo Sandoval added two hits, including a double, and Hunter Pence added a sacrifice fly.

Wilin Rosario hit a two-run homer off Santiago Casilla in the eighth inning, matching the Rockies' rookie record of 25 set by Todd Helton in 1998.

Dodgers, Nationals (PPD-rain)

Phillies, Mets (PPD)