ST. LOUIS (AP) — The St. Louis Cardinals clinched their first National League Central division title in four years, beating the Chicago Cubs 7-0 Friday behind the strong pitching of Lance Lynn and home runs by David Freese and Matt Holliday.

St. Louis (95-65) has won six of seven and is tied with the Atlanta Braves for the best record in the NL.

The Cardinals are assured of home-field advantage when the NL division series starts Thursday.

The Pittsburgh Pirates, meanwhile, beat the Cincinnati Reds 4-1 in a series that will decide the NL wild-card game host on Tuesday night.

With the Cardinals clinching the Central title, it comes down to who gets to host the wild-card playoff on Tuesday, and the Pirates are one win away from taking it to Pittsburgh.

Marlon Byrd had three hits and Pedro Alvarez hit a two-run homer high off the batter's eye to lead the Pirates.

Cincinnati has lost three straight and scored one run in the last 22 innings.

In the American League playoff race, the Cleveland Indians beat the Minnesota Twins 12-6 to move into a tie with the Tampa Bay Rays for the first wild card, one game ahead of the Texas Rangers.

Tampa Bay lost to the Toronto Blue Jays 6-3, while the Rangers beat the Los Angeles Angels 5-3.

Cleveland has won eight straight and 13 of 15, taking advantage of a schedule that ends with 10 games against the Houston Astros, the Chicago White Sox and the Twins, the three worst teams in the AL this season.

Carlos Santana and Asdrubal Cabrera both had two doubles and Jason Kipnis was a homer short of the cycle for the Indians.

The Rays, meanwhile, wasted a 2-0 lead and committed a season-high three errors as their seven-game winning streak was broken.

Toronto's R.A. Dickey allowed two runs and five hits in 7 1-3 innings, retiring 13 of 14 during one stretch.

The 38-year-old knuckleballer, acquired from the New York Mets during the offseason after he won the NL Cy Young Award, struggled earlier this season but finished strongly, going 5-1 with a 3.17 ERA in his last seven starts.

The Rangers gained some ground in the wild-card race with their fifth win in a row.

Alex Rios had a tiebreaking RBI single in the seventh inning, then scored on a two-out infield single by A.J. Pierzynski.

The loss was the 82nd for the Angels, ensuring them of only their second losing record in the past 10 seasons.

Elsewhere in the AL, the East division champion Boston Red Sox routed the Baltimore Orioles 12-3 to move closer to securing home-field advantage throughout the postseason.

Clay Buchholz allowed three runs over seven innings and Daniel Nava and David Ortiz each hit three-run homers for Boston, which opened an 8-0 lead by the third inning.

The Oakland Athletics beat the Seattle Mariners 8-2 to remain two games behind Boston (97-63) for the best record in the AL with two games left in the season.

Bartolo Colon reached 18 wins for the fifth time in his career and Brandon Moss hit a three-run homer in the first inning for the AL West division champion Athletics.

In other games, Atlanta's Chris Johnson led off the eighth inning with a homer and Kris Medlen allowed only two hits in eight innings as NL East division champion Braves beat the Philadelphia Phillies 1-0.

Medlen (15-12) strengthened his case to be the Braves' starter in the first game of the NL division series next week. He allowed two hits with two walks and seven strikeouts, and has won five straight decisions.

San Francisco's Hunter Pence hit his career-best 26th home run to back a shaky outing by Ryan Vogelsong as the Giants beat the San Diego Padres 7-3 in the season-ending series between two teams battling to stay out of the cellar in the NL West.

Detroit's Jhonny Peralta had a hit and an RBI double in his first game since completing a 50-game suspension, but the Tigers lost to the Miami Marlins 3-2.

Peralta had been suspended for his involvement with Biogenesis of America, a Florida-based anti-aging clinic accused of distributing performance-enhancing drugs.

The Los Angeles Dodgers beat the Colorado Rockies 11-0, with Clayton Kershaw scattering four hits over six innings to lower his ERA to 1.83.

Kershaw (16-9) became the first pitcher to lead the majors in ERA in three consecutive seasons since Atlanta's Greg Maddux from 1993-95.

The New York Yankees stopped a four-game losing streak with a 3-2 win over the Houston Astros.

Houston dropped to 51-109, the most losses for a Major League Baseball team since the 2004 Arizona Diamondbacks went 51-111.

Milwaukee's Norichika Aoki hit a leadoff homer and Khris Davis connected three batters later as the Brewers beat the New York Mets 4-2.

Kansas City's James Shields struck out 10 and scattered four hits over seven innings for his 100th career win as the Royals beat the Chicago White Sox 6-1.

At 62-98 with two games remaining, the White Sox will finish with the second-most losses in franchise history, only ahead of the team that went 56-106 in 1970.

And Washington's Jayson Werth and Wilson Ramos each hit three-run home runs as the Nationals beat the Arizona Diamondbacks 8-4.