Matt Joyce hit a two-run double in a five-run fifth inning against Tyson Ross (2-9), hastily called up from the minors to pitch in place of suspended Oakland starter Bartolo Colon.
Cobb (8-8) struck out eight and walked two in his second career complete game, both this season. He bounced back from a poor outing against the Los Angeles Angels to win for the fourth time in five starts.
It was the 14th victory in 17 games for the Rays and their seventh shutout since July 19. It's the closest they've been to first place since they were 2 1/2 out before games of June 16.
Oakland dropped into a tie with Baltimore and Detroit for the AL's second wild-card spot, 2 1/2 games behind the Rays.
TIGERS 3, BLUE JAYS 2, 11 INNINGS
DETROIT (AP) — Alex Avila's RBI single with two outs in the 11th gave Detroit a victory over Toronto, one inning after centre-fielder Austin Jackson kept the game tied with a spectacular catch.
With two runners on, Avila singled to right off Chad Jenkins (0-1).
Joaquin Benoit (3-3) got the win. Justin Verlander struck out 12 in nine innings for the Tigers.
Detroit slugger Miguel Cabrera left in the second because of a sore right ankle and is day to day. The Tigers pulled within 1 1/2 games of the first-place Chicago White Sox in the AL Central.
J.A. Happ took a shutout into the eighth inning for Toronto, but the bullpen couldn't hold a 2-0 lead. Edwin Encarnacion hit a two-run homer off Verlander.
ANGELS 14, RED SOX 13, 10 innings
BOSTON (AP) — Kendrys Morales led off Los Angeles' two-run 10th inning with a solo homer, and the Angels completed a three-game sweep of Boston by outlasting the Red Sox.
The Red Sox wasted a 6-0 lead, then rallied from deficits of 8-7 in the sixth and 12-11 in the ninth. But closer Alfredo Aceves struggled after Boston was one out away from victory in the ninth. Aceves (2-8) gave up five runs and six hits in one inning, and the Red Sox lost for the 11th time in 15 games.
Ernesto Frieri (2-0) got the win after giving up a tying solo homer in the ninth to Cody Ross, his 19th of the season, and an RBI single in the 10th to Dustin Pedroia, who drove in five runs.
Frieri was charged with a blown save, but secured the win when he struck out Adrian Gonzalez to end the 4-hour, 34-minute game.
With the score tied at 12, Morales jumped on an 0-1 pitch from Aceves for his 16th homer — just over the low right field fence. Erick Aybar followed with a single, knocking out Aceves. Vernon Wells hit an RBI double off Craig Breslow for the final run.
The Angels, who were swept in four games by Tampa Bay before coming to Boston, remained five games behind the Rays and closed to within 3 1-2 of Baltimore in the race for the AL's two wild-card spots.
Los Angeles starter C.J. Wilson, 0-5 in his last 11 starts, struggled again. The Red Sox took a 6-0 lead in the second inning.
RANGERS 10, TWINS 6
ARLINGTON, Texas (AP) — Josh Hamilton had five RBIs, and Mitch Moreland doubled in the go-ahead run during a six-run eighth inning that carried Texas over Minnesota.
Adrian Beltre had three hits, including his fourth homer in two days, and scored the tie-breaking run on Moreland's drive to left-centre.
Minnesota starter Scott Diamond of Guelph, Ont., was ejected in the third inning by plate umpire Wally Bell after throwing a pitch behind Hamilton's head. Twins manager Ron Gardenhire also was tossed after immediately protesting Bell's decision.
Rangers starter Roy Oswalt had hit slugger Joe Mauer in the back in the preceding half-inning.
A pair of Twins errors led to five unearned runs in the eighth as the AL West leaders sent 11 batters to the plate to break a 4-all tie. Geovany Soto, Ian Kinsler and Elvis Andrus also had RBIs in the inning.
Jared Burton (1-1) took the loss after giving up six runs on three hits and two walks in two-thirds of an inning.
Mike Adams (3-3) worked a scoreless eighth for the win. Joe Nathan entered in the ninth after Tanner Scheppers gave up two runs with two outs and converted his 22nd consecutive save opportunity and 25th of the season.