DETROIT -- The Detroit Tigers ensured they'll dodge some ugly history Sunday.
Most of the players had no idea.
By beating the Chicago White Sox 6-3, the Tigers improved to 22-56 at Comerica Park, making certain they won't become the first major league team to lose 60 home games.
"I had no idea we even had a chance at doing that," catcher Grayson Greiner said. "I'm glad it isn't going to happen."
Tigers manager Ron Gardenhire knew the possibility existed but had been trying not to focus on it.
"Is today the one that prevents us from getting to 60?" he asked. "I knew it was getting close, but I didn't know the exact number."
The Tigers still need to win one of their final three home games to avoid tying the 1939 St. Louis Browns' record of 59 home losses.
"Those are not the numbers you want to end up with," Gardenhire said.
Detroit played one of its best games in weeks to avoid a three-game sweep by the White Sox. The Tigers hit four homers, including the first of Willi Castro's major league career.
"This was a great team win," starting pitcher Matthew Boyd said. "We hit the ball, we made some great defensive plays and we did a good job pitching against a good offensive team."
The White Sox got homers from Eloy Jimenez and Wellington Castillo but lost for the 17th time in 25 games.
Boyd (9-11), who missed his last start after the death of his grandfather, gave up three runs, eight hits and two walks in five innings.
"Grayson called a great game, and he got me to throw the changeup more often," Boyd said. "I'm not exactly leery about it, but I fell a little in love with my slider. He got me out of that."
Joe Jimenez pitched the ninth for his eighth save. The Tigers (46-109) are trying to avoid the second 110-loss season in club history.
White Sox starter Reynaldo Lopez (9-15) allowed five runs and nine hits, including three home runs, in four innings.
"This was a bad day, and I definitely can't say it has been a good season," Lopez said. "I have to take it as a learning season and apply those lessons toward next year."
Boyd retired the first two batters of the game, but Jose Abreu singled and Jimenez hit his 30th homer. It was the 242nd homer allowed by the Tigers this season, breaking the franchise record set in 1996.
Jimenez joined Ron Kittle (1983) and Abreu (2014) as the only White Sox rookies to hit 30 homers.
"This means a lot, because 30 was my goal," Jimenez said. "I hit 22 (in Triple-A) last year and we have more games here, so I wanted to go for 30."
Candelario tied it in the bottom of the inning, hitting his eighth homer off Lopez, and Beckham made it 3-2 with a solo home run in the second.
Christin Stewart's RBI single gave the Tigers a 4-2 lead in the third, and Reyes hit a solo homer in the fourth.
Castillo got the White Sox within 5-3 with a two-out RBI single in the fifth, but Castro connected to put the Tigers back up by three in the seventh.
The switch-hitting Castro, among Detroit's more promising prospects, is batting .224 through his first 25 career games.
"It was great to see Willi get one -- that's always a huge moment," Gardenhire said. "He didn't smile a bit running the bases, but he did when he got to the dugout."
BOYD GETS CLOSER TO HOMER MARK
Jimenez's homer was the 39th allowed by Boyd this season. With one start left, he is tied with Jack Morris (1987) for third in team history. Morris allowed 40 homers in 1986, but Denny McLain has the record with 42 in 1966. Morris pitched more than 260 innings in 1986 and 1987, as did McLain in 1966. Boyd will enter his final start with 181 1/3 innings pitched.
Tigers: DH Miguel Cabrera missed a second straight game with knee soreness.
White Sox: Have Monday off before heading home to start a season-ending, seven-game homestand against the Indians and Tigers. Neither team has announced a starter for Tuesday's opener.
More AP MLB: https://apnews.com/MLB and https://twitter.com/AP-Sports
Chicago Cubs agree to 1-year contract with reliever Dan Winkler
The Chicago Cubs and reliever Dan Winkler agreed Friday to a one-year contract that pays $750,000 in the majors.
Bomani wants to see the Yankees throw money at Cole
Bomani Jones and Pablo Torre both want to see the Yankees sign Gerrit Cole to a record-setting deal.
Yankees GM rappels building, gets fan's message on Gerrit Cole
Brian Cashman saw a message taped to a 10th-floor window while prepping for a festival in Connecticut. "Please sign Gerrit Cole," it said. The GM's response: "I'm open to do clearly whatever, as always, is important for the Yankees."
Rays' Blake Snell strongly reacts to Tommy Pham trade on Twitch
Rays pitcher Blake Snell apologized for his reaction -- captured during a livestream on Twitch -- to news that teammate Tommy Pham was traded to San Diego.
What's next for the teams that lose the Gerrit Cole sweepstakes?
One team will land the best pitcher on the planet. The rest of his suitors? They'll have to scramble.
Source: Nationals agree to deal with World Series hero Howie Kendrick
Howie Kendrick, who capped the Nationals' improbable run to their first World Series title last season with a Game 7 home run, has reached an agreement on a one-year, $6.25 million deal to return to Washington, a source told ESPN's Jeff Passan on Friday.