TORONTO -- The Tampa Bay Rays returned to the playoffs for the first time since 2013, clinching an AL wild card berth with a 6-2 win over the Toronto Blue Jays on Friday night behind Tommy Pham's two-run homer and 4 1/3 hitless innings from Tyler Glasnow.

Tampa Bay will play Oakland on the wild-card game on Wednesday night. The Rays will start Charlie Morton.

At 96-64, the low-budget Rays have their most wins since 2010 and can tie the team record of 97 set in 2008, when they won their only AL pennant and lost to Philadelphia in the World Series.

Tampa Bay began the night with a magic number of two to clinch, and Cleveland lost 8-2 at Washington while the Rays were in the eighth inning.

Jubilant players poured out of Tampa Bay's dugout for a celebration around the mound after right-hander Emilio Pagan retired Reese McGuire to end it.

"We do some crazy stuff and people scratch their heads a lot," Rays manager Kevin Cash said. "These guys don't care. They want to win."

Austin Meadows also homered for the Rays, hitting his 33rd this season off Ryan Dull in the ninth.

Making his fourth appearance since returning from the injured list after missing 107 games because of a strained forearm, Glasnow threw 66 pitches, including 35 strikes, a 14-pitch increase from his previous outing. The right-hander struck out four and walked two.

Glasnow had pitched three innings in each of his two prior starts.

Left-hander Colin Poche replaced Glasnow and immediately gave up a double to Teoscar Hernandez, his first batter, before retiring the next two. Poche worked 1 1/3 innings.

T.J. Zeuch (1-2) allowed three runs and four hits in five innings.

Pham homered in the third, and Willy Adames made it 3-0 with a two-out RBI single in the fourth.

Hernandez hit a two-run home run in the seventh off Oliver Drake (5-2).

TRAINER'S ROOM

Rays: 1B Ji-Man Choi (left foot) did not start and is day to day. Choi remained in Florida undergoing additional tests to confirm there are no fractures in his left foot, hit by a foul Wednesday. ... ``He's not moving around too quick right now,'' Cash said. ... INF Yandy Diaz (left foot) will play in an instructional league game Saturday and could rejoin the team Sunday. Diaz has been out since July 23 and is on the 60-day IL.

Blue Jays: SS Bo Bichette (concussion) fielded ground balls before the game but has not been cleared to return.

UP NEXT

Rays: Tampa Bay had not announced a starter for Saturday.

Blue Jays: RHP Trent Thornton (5-9, 5.00) has allowed 15 earned runs in 16 innings over four starts against the Rays this season.