CHICAGO — Tim Beckham homered, and the Tampa Bay Rays won their reunion with Joe Maddon, beating the Chicago Cubs 6-5 on Tuesday.

Beckham’s two-run drive highlighted a five-run fourth against Jon Lester (5-5). Alex Colome gave up two runs in the ninth, but the Rays won their first meeting against Maddon since he left to manage Chicago following the 2014 season.

Colome threw 38 pitches in the ninth but came away with his 22nd save in 26 chances.

He gave up a leadoff single to pinch-hitter Albert Almora Jr. and walked Jon Jay to put runners on first and second. After Kris Bryant popped out, Anthony Rizzo lined an RBI single to make it 6-4.

Ben Zobrist then bounced into a force to bring home another run. Ian Happ walked on a 3-2 pitch to put men on first and second, before Jason Heyward hit a fly to left.

Chris Archer (7-5) picked up his third win in four starts, giving up three runs and eight hits in six innings. The former Cubs prospect also had an RBI single for his first career hit.

TIGERS 5, GIANTS 3: Victor Martinez homered, Michael Fulmer pitched eight innings and host Detroit snapped San Francisco’s six-game win streak.

BREWERS 6, ORIOLES 2: Eric Thames hit a pair of home runs and Jimmy Nelson pitched seven strong innings to lead Milwaukee over visiting Baltimore.

Stephen Vogt and Travis Shaw also homered for the Brewers.

PADRES 1, INDIANS 0: Cory Spangenberg drove in the only run with a groundout, and six pitchers combined on a five-hitter as visiting San Diego beat Cleveland despite a record-setting outing by All-Star Corey Kluber.

Kluber (7-3) allowed one run and struck out 10 in eight innings – setting a franchise mark with five consecutive double-digit strikeout games.

AMERICAN LEAGUE

BLUE JAYS 4, YANKEES 1: CC Sabathia was chased during a four-run third inning in his return from the disabled list, with Kendrys Morales hitting a two-run single that helped visiting Toronto stop a five-game losing streak.

Aaron Judge dented a metal casement above a door behind the left-center field wall with his major league-leading 28th home run.

TWINS 5, ANGELS 4: Kyle Gibson pitched into the seventh to snap his three-game winless streak, Byron Buxton hit his fifth homer and Minnesota won at home.

ATHLETICS 7, WHITE SOX 6: Franklin Barreto homered in the ninth inning, Yonder Alonso went deep twice and host Oakland snapped a six-game losing streak.

ROYALS 7, MARINERS 3: Whit Merrifield hit the first pitch of the game from Felix Hernandez for his seventh home run, Mike Moustakas added his 24th homer of the season, and visiting Kansas City won for the fifth time in six games.

NATIONAL LEAGUE

MARLINS 6, CARDINALS 2: Christian Yelich hit a three-run homer, Jose Urena tossed five solid innings and Miami won at St. Louis.

NATIONALS 11, METS 4: Daniel Murphy drove in five runs on four hits, Bryce Harper had three hits and two RBI and Washington crushed visiting New York.

PIRATES 3, PHILLIES 0: Jameson Taillon struck out a career-best nine in five innings, Andrew McCutchen hit a pair of solo homers and Pittsburgh won at Philadelphia.