ST. LOUIS — Carlos Beltran homered from both sides of the plate for the ninth time in his career and drove in five runs, and the St. Louis Cardinals closed in on the NL's second wild-card berth by beating the Washington Nationals 10-4 Sunday. 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 postseason baseball since 1933, saw its magic number for clinching the NL East remain at one over second-place Atlanta (93-66). Braves 6, Mets 2: 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. 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. Reds 4, Pirates 3: 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. Dodgers 7, Rockies 1: 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. Phillies 4, Marlins 1: 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. Astros 7, Brewers 0: 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 postseason race. But the last-place Astros won two of three at Miller Park to finish off Milwaukee. Giants 7, Padres 5: 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. 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-center. Cubs 7, Diamondbacks 2: 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. — Agencies