CHICAGO — Detroit manager Brad Ausmus glanced at the stadium scoreboard with his team ahead and saw Baltimore had lost. If the Tigers held on, they’d enter their weekend series against the Orioles tied for the final AL wild-card spot.

Then Shane Greene and the bullpen faltered and Ausmus had to settle for what he called a “mediocre” road trip.

Avisail Garcia hit a go-ahead single against his former team in a four-run eighth inning and the Chicago White Sox beat Detroit 7-4 on Wednesday to keep the Tigers a game behind the Orioles.

“It could be worse, .500 isn’t awful,” Ausmus said of their trip. “Would have been nice to take this one today and take four out of six. But we’ll go 3-3 and we’ve got a big series with Baltimore coming up.”

Jose Abreu led off the eighth with a single for his third hit and scored on Justin Morneau’s double off Greene (3-4). After Todd Frazier grounded out, Garcia singled to right-center.

“I left some balls over the plate and they hit all of them,” Greene said. “This one is on me, and I won’t let it happen again.”

Tyler Saladino and Adam Eaton added RBI singles before the Tigers finally got out of the inning after using three pitchers.

“That’s the thing about the back of the bullpen,” Ausmus said, “when they have an off day you generally lose.”

Chris Beck (2-1) got four outs in relief before David Robertson made it interesting in the ninth.

J.D. Martinez walked and Justin Upton singled to before Robertson, who has seven blown saves, retired the next three batters for his 35th save.

The start was delayed 40 minutes for a threat of thunderstorms that never arrived on a steamy day with the heat index approaching 100 degrees.

Upton hit an early three-run homer and Jose Iglesias had an RBI single in the seventh that put Detroit ahead 4-3.

In what could be his last start in the Tigers’ rotation, Anibal Sanchez allowed three runs and eight hits over five innings. Jordan Zimmermann’s return from injury could move him to the bullpen.

White Sox starter Jose Quintana struck out Victor Martinez and Upton to start the seventh, but then gave up a walk and two hits before being lifted after his 116th pitch. He allowed four runs and eight hits and struck out seven.

“Tough to win when I gave up the homer and tried to keep the score close,” Quintana said. “Everybody did a great job today to come back.”

The Tigers lost their second straight to Chicago after an 11-3 stretch got them into playoff contention.

Now they return home for their most important series of the season.

“It’s probably a little ironic that we’re facing Baltimore in September, with them not in the division,” Ausmus said. “I guess we’re fortuitous, depending on your outlook.

“Both teams are trying to clinch a playoff spot and they’re essentially fighting for the same one,” he said.

TRAINER’S ROOM

Tigers: 2B Ian Kinsler applied glue to his injured fingernail and returned earlier than Ausmus expected. Kinsler went 1 for 4 and was picked off first. . DH Victor Martinez, who has had surgery on both knees, stayed in despite limping off after he was thrown out at second base in the fourth. “He’s always going to have issues with the knees,” Ausmus said. “He just tweaked it a little bit on the slide.”

White Sox: RHP James Shields (back) threw a bullpen session. He hopes to start Saturday.

TIGERS TORMENTER

Garcia, signed by the Tigers as an amateur free agent in 2007, spent parts of two seasons with Detroit before being traded to the White Sox in 2013. Garcia has 36 RBIs against Detroit, his most vs. any opponent.

CASTELLANOS UPDATE

Tigers 3B Nick Castellanos, on the disabled list since Aug. 7 with a broken left hand, plans to start swinging a regular bat this week. He intends to return this season.

“It’s getting through as much discomfort as I can and progressing so when my bone is healed, I’m ready to play,” Castellanos said.

UP NEXT

Tigers: RHP Michael Fulmer (10-6, 2.77 ERA) is set to start the opener Friday night against Baltimore RHP Kevin Gausman (7-10, 3.58).

White Sox: The 10-game homestand continues Friday night with LHP Carlos Rodon (6-8, 3.90) facing Kansas City RHP Yordano Ventura (10-9, 4.22).