ST. PETERSBURG, Fla. – Rookie Wil Myers homered and had three RBI, Alex Cobb pitched eight solid innings, and the Tampa Bay Rays took the lead for the first AL wild-card spot by beating the Texas Rangers 6-2 on Monday night.

Myers had a second-inning solo shot and hit a two-run double during a four-run fifth. Cobb (9-3) allowed two runs, six hits, one walk and had 10 strikeouts.

The Rangers have lost seven in a row.

The announced crowd was just 10,724. The Rays entered with the major’s lowest home attendance average of 18,747.

TIGERS 4, MARINERS 2: Rick Porcello struck out 10 in six innings and Detroit won at home to move a step closer to its third straight AL Central title.

Victor Martinez broke a 1-all tie in the sixth with a run-scoring single, and Omar Infante followed with an RBI single.

Porcello (13-8) allowed a run and five hits with two walks, falling one strikeout short of his career high. Drew Smyly got five outs in relief and Jose Veras finished the eighth.

The Tigers have a six-game lead over the Indians.

ROYALS 7, INDIANS 1: James Shields (12-9) kept the Indians off balance for six innings, Salvador Perez led a scrappy Kansas City offense and the Royals won at home to open a three-game set with significant playoff implications.

Shields struck out a season-high 10 for the Royals (79-71), who moved within 2½ games of the AL’s second wild-card berth.

NATIONAL LEAGUE

PADRES 2, PIRATES 0: Andrew Cashner carried a perfect game into the seventh inning and faced the minimum 27 batters in a one-hitter at Pittsburgh.

Cashner (10-8) retired his first 18 batters before Jose Tabata grounded a clean single into right field leading off the seventh. Cashner struck out seven and did not walk a batter.

The Pirates lost for the second time in eight games.

ROCKIES 6, CARDINALS 2: Todd Helton started his final homestand with a key single in the eighth inning as Colorado topped St. Louis.

Charlie Blackmon had three hits and drove in three runs for the Rockies, who prevented the Cardinals from taking over sole possession of first place in the NL Central. They remained tied with the Pittsburgh Pirates.

PHILLIES 12, MARLINS 2: Cliff Lee (14-6) had three hits, knocked in a career-high four runs and struck out a season-high 14 in a win at Philadelphia.

BREWERS 6, CUBS 1: Caleb Gindl had three hits, including a two-run home run, and Wily Peralta (10-15) pitched six strong innings at Milwaukee.

INTERLEAGUE

REDS 6, ASTROS 1: Johnny Cueto threw five scoreless innings in his return from the disabled list and Zack Cozart homered and drove in four runs to help Cincinnati win at Houston.

Pitching for the first time since June 28, Cueto (5-2) allowed five hits and struck out five.

Cincinnati moved five games ahead of postponed Washington for the second NL wild card.