KANSAS CITY, Mo. —The Kansas City Royals clinched the AL Central for their first division title in 30 years, beating the Seattle Mariners 10-4 Thursday night.

Johnny Cueto picked up his first victory in nearly six weeks, and the win, coupled with the Minnesota Twins’ 6-3 loss to the Cleveland Indians, ensured a title. The Royals have dominated the division, leading by as many as 14 games.

It’s the Royals’ first division title since 1985, when they won the AL West en route to their only World Series championship.

The Kauffman Stadium announced crowd of 32,244 cheered when the Twins’ final score was shown on the scoreboard in the top of the ninth.

Kansas City became the first team to wrap up a division title this year. St. Louis and Pittsburgh have secured playoff berths in the NL.

RANGERS 8, ATHLETICS 1: Cole Hamels pitched six innings to earn his fifth consecutive win and Prince Fielder hit his 22nd homer as visiting Texas completed a three-game sweep.

The Rangers moved a season-high 14 games over .500 and extended their lead to 31/2 games over the idle Astros in the AL West.

YANKEES 3, WHITE SOX 2: Carlos Beltran hit a three-run homer off White Sox ace Chris Sale, leading Michael Pineda and New York to a win at home.

The Yankees closed to within three games of idle Toronto in the AL East. New York cut its magic number to six for clinching at least a wild-card slot.

Beltran, a postseason star throughout his career, gave the Yankees a boost to begin their final homestand of the season. He connected in the third inning for his 18th homer.

INDIANS 6, TWINS 3: Jason Kipnis hit a leadoff homer, Carlos Santana connected for a three-run shot and visiting Cleveland helped its slim playoff chances by beating Minnesota .

NATIONAL LEAGUE

PIRATES 5, ROCKIES 4: Pedro Alvarez hit a go-ahead, three-run homer in the eighth inning, and visiting Pittsburgh earned its 10,000th win since joining the National League.

A day after clinching a playoff spot for the third straight season, the Pirates reached another momentous milestone. They’re fifth all time in NL wins behind San Francisco, Chicago, Atlanta and Los Angeles, according to STATS.

MARLINS 1, PHILLIES 0: J.T. Realmuto’s RBI triple in the seventh inning broke a scoreless tie and Miami topped visiting Philadelphia.

DODGERS 6, DIAMONDBACKS 3: Chris Heisey hit a grand slam in a six-run fifth inning and Los Angeles trimmed its magic number to four for the NL West.

Clayton Kershaw (15-7) had nine strikeouts while yielding six hits and three runs over five innings. He left trailing 3-0, but ended up with his fifth victory in six starts.

CARDINALS 7, BREWERS 3: Jhonny Peralta and Stephen Piscotty hit back-to-back homers and combined for seven RBI to power host St. Louis.

METS 6, REDS 4: Daniel Murphy had three hits, including a tie-breaking triple in the seventh inning, and New York won at Cincinnati to Mets close in on their first playoff appearance in nine years.

Combined with Washington’s loss, the Mets’ magic number for clinching the NL East title was reduced to three.

INTERLEAGUE

ORIOLES 5, NATIONALS 4: Jonathan Schoop and Matt Wieters hit two-run homers and visiting Baltimore completed a three-game sweep.