The Rockies had matched a season best with a five-game winning streak.
Chicago trailed 3-2 going into the eighth before Brett Jackson led off with his second homer of the season.
Pinch-hitter Luis Valbuena doubled with one out and Mather, batting in the leadoff spot usually occupied by David DeJesus, followed with an RBI single against reliever Matt Belisle (3-5).
Mather scored on reliever Matt Reynolds' throwing error.
James Russell (6-1) got two outs for the win and Carlos Marmol closed for his 16th save.
Chris Nelson hit his sixth homer for the Cubs and Carlos Gonzalez hit his 21st and first since July 23.
Alfonso Soriano and Welington Castillo hit solo home runs for the Cubs.
BREWERS 6, PIRATES 5
PITTSBURGH (AP) — Mike Fiers pitched effectively into the seventh inning, Aramis Ramirez had a go-ahead three-run double in the seventh and Milwaukee held on to win its fourth straight.
Fiers (7-6) tied a career high with 10 strikeouts. The rookie allowed three runs and five hits in 6 2-3 innings.
Ramirez went 2 for 4 and scored two runs. He cleared the bases with a two-out double to right-centre in the seventh, breaking a 2-2 tie. Ramirez then scored on Corey Hart's single.
The Pirates rallied for two runs in the ninth off Canadian closer John Axford, but Kameron Loe struck out pinch-hitter Gaby Sanchez to with two men on to end the game. Loe's save was his second in two weeks, the fourth of his career.
Rod Barajas homered for the Pirates, who have lost four straight.
The Brewers won on the road for only the second time since the All-Star break. They had lost 14 of their previous 15 road games.
Wandy Rodriguez (8-13) fell to 0-4 as a starter with the Pirates — he earned a win by pitching the 18th and 19th innings Sunday in St. Louis — since being acquired for three prospects in a trade with Houston July 24.
Rodriguez allowed three runs, six hits and four walks in 6 2-3 innings. He had three strikeouts.
PHILLIES 4, NATIONALS 2
PHILADELPHIA (AP) — Kyle Kendrick pitched effectively for 6 2-3 innings and Jimmy Rollins drove in two runs to lead Philadelphia.
Kendrick (7-9), one of seven pitchers used by Philadelphia, allowed four hits and struck out three to help the Phillies win for the fifth time in the last seven games.
Tyler Moore homered for Washington, which lost its second straight.
Moore snapped Kendrick's 21 2-3 innings scoreless streak with a two-out, two-run homer in the seventh.
Edwin Jackson (11-8) gave up three runs and seven hits with eight strikeouts and two walks in six innings to fall to 0-4 with a 5.32 ERA in four career starts against Philadelphia.
Jonathan Papelbon earned his 28th save in 31 chances with a scoreless ninth.
Rollins gave the Phillies a 3-0 lead in the fourth when he lined an opposite-field, two-out single.
ASTROS 3, METS 1
NEW YORK (AP) — Jordan Lyles won for the first time in two months and Houston snapped a seven-game skid and gave Tony DeFrancesco his first win as a major league manager.
Tyler Greene homered and Lyles knocked in a run with his first career double as the Astros (40-86) improved to 4-0 against the Mets this season. Houston, with the worst record in the majors, won for only the eighth time in its last 51 games.
David Wright hit his 200th homer for the Mets, who have lost six straight and nine of 11. Despite facing the two worst pitching staffs in the NL over the past five days, they have gone seven games without scoring more than two runs for the first time since September 1982, according to STATS LLC.
Jonathon Niese (10-7) went seven innings but the Mets are 0 for 14 with runners in scoring position over their last two games, leaving them 25 for 151 (.166) in those situations this month.
The Astros had dropped all four games since DeFrancesco took over as interim manager Sunday after Brad Mills was fired, getting outscored 32-8.
CARDINALS 8, REDS 5
CINCINNATI (AP) — Allen Craig and Yadier Molina homered during a six-run sixth inning for St. Louis.
The Cardinals' big comeback off Mat Latos (10-4) started a 10-day trip against the Reds, Pirates and Nationals.
Cincinnati knocked out starter Lance Lynn in the third inning. Joe Kelly (4-5) fanned six in three innings of relief. Jason Motte pitched the ninth for his 30th save in 35 chances.
Latos tried to extend his August dominance — only three earned runs allowed in his four previous starts. He suffered a meltdown in the sixth inning, when he gave up four runs without retiring a batter.
The inning started poorly for Latos, who was slow to cover first base on Carlos Beltran's grounder, letting him reach on an infield single. Matt Holliday singled, and Craig followed with his 19th homer, trying it 5-all. Three pitches later, Molina hit an opposite-field homer — his fourth off the Reds this season.
They Cardinals have won four straight and 13 of their past 20 to move a season-high 13 games over .500.
PADRES 5, DIAMONDBACKS 0
PHOENIX (AP) — Eric Stults threw seven strong innings and drove in a career-best three runs with two two-out hits for San Diego.
Stults (4-2) allowed three singles, struck out four and walked one. He singled in two runs in the second and doubled home another in the fourth.
Chris Denorfia hit a solo home run off rookie Patrick Corbin (5-5) in the third and brought another run home with a sacrifice fly in the seventh.
The Padres, coming off a three-game home sweep of Pittsburgh, have won five straight.
Nick Vincent and Tommy Layne each pitched an inning to complete the shutout.
The Diamondbacks dropped to 2-3 halfway through a 10-game home stand. San Diego outhit Arizona 13-4.
GIANTS 5, BRAVES 3
SAN FRANCISCO (AP) — Angel Pagan had a go-ahead triple among his four hits to help back Ryan Vogelsong's first victory in three starts, and San Francisco won its fifth straight.
Pablo Sandoval hit an RBI double and also scored the tying run for the NL West-leading Giants on a wild pitch in the third, and Buster Posey doubled in a run after missing the previous two games with tightness in his right hamstring.
Freddie Freeman hit two solo home runs for his third career multi-homer game and Jason Heyward also connected for the Braves, who lost for the sixth time in seven games. Freeman hit his 16th and 17th homers of the year. He connected twice at Arizona on April 19.
Vogelsong (11-7) won despite allowing just his 11th, 12th and 13th homers of the year — his most since surrendering three homers to the Cubs on April 20, 2004, while with Pittsburgh.
San Francisco (71-55) moved a season-best 16 games over .500, one shy of matching the club's best mark of 17-over last year.
DODGERS 11, MARLINS 4
LOS ANGELES (AP) — Andre Ethier was 4 for 4 with a homer and four RBIs and Hanley Ramirez and Juan Rivera also went deep against Nathan Eovaldi in his return to Dodger Stadium.
Chad Billingsley, trying to win his seventh straight start, departed in the fourth with a 6-3 lead because of tenderness in his elbow. The right-hander was charged with three runs, five hits and three walks over 3 1-3 innings in his shortest outing this season after giving up a two-run homer in the first by Jose Reyes.
Rob Brantley lined a double off the bullpen gate in right field on Billingsley's 58th and final pitch, giving the Marlins two men in scoring position with one out. Winning pitcher Jamey Wright (5-3) inherited a 2-0 count on pinch-hitter Gorkys Hernandez, who ended up with a walk that was charged to Billingsley. But Bryan Petersen struck out and Justin Ruggiano looked at a called third strike.
Eovaldi (4-9) gave up six runs and seven hits over three innings in his sixth start for the Marlins, who acquired him on July 24 in the trade that sent Ramirez and reliever Randy Choate to Los Angeles.