St. Louis (86-73) took a 7-0 lead by the third inning and reduced its magic number for clinching to two. They lead the Dodgers by two games for the second NL wild card.
Washington (96-63), already assured of the capital's first post-season baseball since 1933, saw its magic number for clinching the NL East remain at one over second-place Atlanta (93-66).
Lance Lynn (18-7) allowed four runs and six hits in 5 1-3 innings, improving to 5-0 with a 2.10 ERA in his last five appearances.
Beltran hit a pair of two-run homers, connecting right-handed off Ross Detwiler (10-8) in the second and left-handed against Chien-Ming Wang in the fourth.
BRAVES 6, METS 2
ATLANTA (AP) — The Atlanta Braves won for a major league record 23rd straight time in games started by Kris Medlen, beating the Mets in the regular-season home finale for Chipper Jones.
Medlen (10-1) gave up one unearned run and three hits in six innings.
According to STATS LLC research going back to 1921, only two other teams won 22 straight starts by a pitcher: the New York Giants with Carl Hubbell (1936-37) and the Yankees with Whitey Ford (1950-53). Ford's streak was interrupted by military service.
Atlanta is 12-0 in Medlen's starts this season after he moved to the rotation on July 31. The team's streak of 23 straight wins in Medlen's starts began in 2010.
David Ross hit a three-run homer in the second off Jenrry Mejia (1-3). Jones had a single and two walks.
REDS 4, PIRATES 3
PITTSBURGH (AP) — The Pirates ensured they'd finish with a record 20th straight losing season Sunday when they blew a ninth-inning lead in a 4-3 defeat to the Reds.
Pinch-hitter Xavier Paul led off the ninth with a home run off Joel Hanrahan (5-2) and Zack Cozart had a go-head double for Cincinnati, who clinched home-field advantage in the NL division series.
The Pirates extended their major North American professional sports record. Pittsburgh was 16 games over .500 on Aug. 6, but has lost 18 of 23 to fall to 77-82.
Sean Marshall (5-5) got two outs for the win.
DODGERS 7, ROCKIES 1
LOS ANGELES (AP) — Josh Beckett earned his first victory in his last five starts and the Los Angeles Dodgers backed him with three homers, beating Colorado for their fifth straight win to stay in contention for an NL wild-card spot.
Matt Kemp, Luis Cruz and A.J. Ellis each hit two-run homers as the Dodgers remained two games behind St. Louis for the second wild card.
The Dodgers have their first five-game winning streak in more than two months.
Beckett (2-3) allowed one run and six hits in six innings, struck out five and walked three for his first victory since Sept. 1 against Arizona.
Jorge De La Rosa (0-2) gave up four runs and five hits in four innings.
PHILLIES 4, MARLINS 1
MIAMI (AP) — Cole Hamels struck out eight and allowed one run over seven innings to finish his season with a flourish, and the Phillies beat the Marlins.
Hamels (17-6) allowed five hits and walked only one in his final start of the year for the Phillies (80-79), who need one win in the final three-game series at Washington starting Monday to finish at least .500 for the 10th straight season.
Jose Reyes had a pair of hits and Carlos Lee drove in a run for Miami, which lost for the 21st time in its last 29 games.
Marlins starter Nathan Eovaldi (4-13) gave up three runs — all in the first — and struck out seven in six innings.
ASTROS 7, BREWERS 0
MILWAUKEE (AP) — Jordan Lyles pitched his first major league shutout and hit his first home run as Houston eliminated the Brewers from wild-card playoff contention.
The Brewers, who reached the NL championship series last year, had surged since mid-August to get back into the post-season race. But the last-place Astros won two of three at Miller Park to finish off Milwaukee.
The 21-year-old Lyles (5-12) threw a four-hitter in his first complete game in 40 big league starts.
Mike Fiers (9-10) struck out 10 in six innings, but also gave up Houston's four home runs. He had gone 1-3 with a 6.97 ERA over his previous five starts and ran into more trouble.
GIANTS 7, PADRES 5
SAN DIEGO (AP) — Pinch-hitter Xavier Nady homered off Huston Street to tie the game with one out in the ninth and Hunter Spence hit a go-ahead, two-run shot as the Giants rallied to beat San Diego.
Tim Lincecum might no longer be a lock for the No. 3 spot in NL West champion Giants playoff rotation — he gave up a season-high three homers. Manager Bruce Bochy instead might consider lefty Barry Zito (14-8), who was left off the roster for all three post-season rounds during the team's improbable 2010 run to the World Series championship. San Francisco has won Zito's last 10 outings.
With the Giants trailing 5-4, Nady drove a 1-0 pitch from Street (2-1) into the sandy play area beyond the fence in right-centre.
Shane Loux (1-0) pitched one inning for the win.
CUBS 7, DIAMONDBACKS 2
PHOENIX (AP) — Anthony Rizzo had three hits, David DeJesus homered and the Chicago Cubs ended a seven-game losing streak, beating the Diamondbacks.
The Cubs had lost 18 in a row against NL West opponents. The win allowed them to avoid a 100th loss this season, with three games remaining.
Chris Rusin (2-3) allowed one earned run and three hits in five innings.
Brian LaHair's two-run single capped a four-run sixth inning against Bryan Shaw (1-6) and two other Arizona relievers.