ST. PETERSBURG, Fla. - Chris Archer had enough Saturday night. Tim Beckham was eager for one more at-bat.

Beckham had a two-run single with two outs in the bottom of the ninth inning and the Tampa Bay Rays rallied to beat the AL East champion Toronto Blue Jays 4-3.

Grady Sizemore had a leadoff double off Roberto Osuna (1-6), who later loaded the bases with two outs with two walks. Beckham won it with his liner to left.

"I've had some rough at-bats today and yesterday and the day before," Beckham said after his first walk-off hit. "I was hoping I'd get up. I didn't want to end my season like that."

Archer gave up one run, five hits, one walk and had three strikeouts before leaving after five innings.

"It's been a long season, man," Archer said. "I've pitched every fifth day. I didn't have an All-Star break; I pitched three days after the All-Star break. So just thinking everything through, we just decided to put an end to it after five."

He became the seventh pitcher since 1900 to strike out more than 250 (252 in 212 innings) and not have a winning record (12-13) for the season.

Others to accomplish it are Roger Clemens, Nolan Ryan, Steve Carlton, Phil Niekro, Ben Sheets and Ed Walsh.

"(Archer) was pretty exhausted," manager Kevin Cash said. "The body, the arm, and when it came up during the game, we said let's go ahead and get him out. It didn't make much sense for him to continue pitching; we're not going to risk him grinding through three or six more outs."

Edwin Encarnacion homered for the fourth consecutive game for the Blue Jays, who fell one game behind Kansas City for the AL's best record and home-field advantage throughout the playoffs heading into Sunday's end of the regular season. Toronto does hold the tiebreaker.

John Jaso and Asdrubal Cabrera homered for the Rays. Alex Colome (8-5) worked the ninth to get the win.

Encarnacion put the Blue Jays up 3-1 on his 39th homer this season, a two-run shot off Brandon Gomes in the sixth.

Encarnacion, Jose Bautista (40) and Josh Donaldson (41) set a team record — breaking the mark set in 1998 by Jose Canseco (46), Carlos Delgado (38) and Shawn Green (35) — for most homers by three players in one season with 120.

Marco Estrada allowed two runs, three hits and struck out nine in 6 2-3 innings. He had his stretch of 21 scoreless innings this season against Tampa Bay ended five pitches in when Jaso hit a leadoff homer in the first.

Cabrera cut the Rays' deficit to 3-2 with his seventh-inning shot.

The Blue Jays tied it at 1 on a third-inning RBI single by Bautista.

RAYS RECORDS

Archer made his 34th start, tying David Price (2011) and Scott Kazmir (2007) for the season club record. ... Jake McGee made his 297th career appearance, passing Joel Peralta for the franchise record.

TRAINER'S ROOM

Blue Jays: SS Troy Tulowitzki, who returned Friday after missing three weeks with a cracked scapula and bruised upper back muscles, had a planned day off and will play Sunday.

Rays: RHP Alex Cobb played catch for the first time since having Tommy John surgery in May. "Felt good," said Cobb, who might return next August.

UP NEXT

Blue Jays: LHP Mark Buehrle, who pitched Friday night, may get the chance Sunday to pick up the two innings needed for a 15th consecutive season of 200 or more innings. If Buehrle elects not to pitch, RHP Drew Hutchison (13-5) will start.

Rays: LHP Matt Moore (2-4), coming back from Tommy John surgery last year, starts Sunday. He has allowed two runs or fewer in four of his last five starts.