Chris Archer overcame a shaky seventh inning to avoid becoming the majors' first 20-game loser since 2003 and lead the Tampa Bay Rays past the Chicago White Sox, 5-3 on Thursday night.

Archer (9-19) allowed three runs and six hits in 6 2/3 innings to help the Rays snap a six-game skid and leave Detroit's Mike Maroth as the only pitcher to lose 20 games this century.

Mikie Mahtook hit a solo homer in the fourth off Jose Quintana (13-12) and doubled and scored in a three-run seventh off Chicago's shaky bullpen.

Quintana allowed two runs and five hits over six innings for the White Sox, whose five-game winning streak ended despite Carlos Sanchez's two-out, two-run homer in the seventh.

Chicago clinched its fourth consecutive losing season under manager Robin Ventura, whose future with the team is uncertain.

Archer got the first two outs of the seventh, but a walk, Sanchez's homer and Leury Garcia's double ended his night. With rain starting to fall, Brad Boxberger got Adam Eaton to ground out with the tying run on.

Erasmo Ramirez worked the eighth amid a steady rain before the umpires called for the tarp. After a 35-minute delay, Alex Colome got the final three outs for his 36th save.

Eaton's groundout to lead off the sixth put Archer over 200 innings for the second consecutive season. But it's been nothing like 2015, when Archer was an All-Star and fifth in the Cy Young Award voting.

While Archer has pitched better in the second half of the season, he's gotten little support. Tampa Bay scored two or fewer runs in 15 of his 19 losses.

Archer's five strikeouts gave him 233, second in the AL behind Detroit's Justin Verlander. He finished with eight consecutive quality starts and a 4.03 ERA.

Alexei Ramirez's RBI single against his former team in the second ended Tampa Bay's 41-inning streak of not holding a lead.

Ramirez also singled and scored in the seventh as the Rays got to relievers Juan Minaya and Dan Jennings to build a 5-1 lead.

TRAINER'S ROOM

Rays: In his second game back from a bruised hand, CF Kevin Kiermaier went 3 for 5 and made a running catch of Sanchez's drive with a runner on to end the game. Manager Kevin Cash before the game called Kiermaier ``the best defensive player in baseball'' and campaigned for a Gold Glove.

White Sox: 2B Tyler Saladino (back) won't play again this season. ``We've got to figure out a way to get him right before he heads home,'' Ventura said.

20-LOSS CLUB

Maroth went 9-21 for the 2003 Tigers, who finished 43-119. Before that, Oakland's Brian Kingman in 1980 was the last to lose 20.

SUNDAY SALE

Ventura had hinted that ace Chris Sale's season was over after Tuesday's victory. That changed when the left-hander asked to start Sunday's season finale against Minnesota.

``I think that's a good testament to finishing out the year and doing it right,'' Ventura said.

UP NEXT

Rays: Three games at NL West champion Texas to close the season. RHP Matt Andriese (8-7, 4.34 ERA) faces Rangers RHP Yu Darvish (6-5, 3.53) on Friday night.

White Sox: LHP Carlos Rodon (8-10, 4.08) starts Friday night against last-place Minnesota and RHP Tyler Duffey (9-11, 6.18).