DETROIT — Justin Upton got another chance, and he made the most of it.

Upton hit a game-ending, three-run homer, and the Detroit Tigers overcame Justin Verlander’s groin injury to beat the Chicago White Sox 7-4 on Sunday for a sweep of their weekend series.

“I had just missed one a couple pitches before — I wanted it back, but you don’t get them back,” Upton said. “I kept battling and I got another pitch. I didn’t watch it, but I knew I got it good.”

Nicholas Castellanos was hit by a pitch from David Robertson (3-2) leading off the Detroit ninth. Second baseman Yolmer Sanchez then misplayed a potential double-play ball and was only able to get Miguel Cabrera at first.

J.D. Martinez, who is hitting .292 with a .792 slugging percentage, was intentionally walked to get to Upton. The slugger fell behind 0-2, took a cutter for ball one, and then hit a curveball over the wall in left for his 11th homer.

“It was a terrible breaking ball that hung in the middle of the zone,” Robertson said. “I’m sure it landed 10 rows back, but I wasn’t looking. It sounded loud.”

The White Sox have dropped five in a row. They were outscored 32-10 in the series.

“We can’t keep doing this,” Robertson said.

Martinez also connected for the Tigers, who have won four straight and five of six to move back to .500 at 28-28. Justin Wilson (3-1) picked up the win with a scoreless inning.

“We knew if Justin could get through the top of the inning, we had a good chance with 2-3-4 coming up in the ninth,” manager Brad Ausmus said. “I’m sure that was a fun day of baseball for our fans.”

Todd Frazier led off the third with his eighth homer, lifting the White Sox to a 2-0 lead. Sanchez then walked on four pitches before Verlander departed with right groin tightness.

Verlander also was visited by a trainer in the second, but he stayed in and struck out Avisail Garcia with the bases loaded to end the inning. The Tigers said he was removed for precautionary reasons.

“He had an MRI just to make sure things are OK, but as things stand, we expect he’ll make his next start,” Ausmus said.

Martinez hit a solo shot in the fourth for his 10th homer, and the Tigers added three more in the sixth.

John Hicks tied the game with an RBI double, and then stole third as Frazier charged a fake bunt attempt. Hicks scored when Alex Presley’s grounder went off Sanchez’s glove for an error, and Jose Iglesias made it 4-2 when he drove in Andrew Romine with a fielder’s choice.

“When Pres fouled the first bunt off, I saw they weren’t running the wheel, so third base was open,” Hicks said. “Once I saw the pitch was down, I just took off.”

Warwick Saupold pitched four scoreless innings in relief of Verlander, but Alex Wilson blew the advantage in the eighth.

Tim Anderson and Kevan Smith hit consecutive RBI doubles, tying it at 4. Leury Garcia singled off Daniel Stumpf to put runners on the corners with one out, but Shane Greene retired the next two batters.

TRAINER’S ROOM

White Sox: RHP James Shields (lat strain) started his rehab assignment Saturday with Triple-A Charlotte, allowing three runs in four innings.

Tigers: 2B Ian Kinsler (hamstring) is expected to return from the disabled list on Tuesday for the opener of a three-game series against the Los Angeles Angels. Ausmus said the team will announce the corresponding move at that point.

ROOKIE MISTAKE

White Sox rookie Adam Engel came up with runners on the corners and one out in the eighth. Manager Rick Renteria called for a safety squeeze, but Engel missed two attempts at pitches outside the zone, and then struck out on the next pitch.

“That’s tough for him right now because we lost the game, but it will be a great learning experience for him,” Renteria said. “We discussed the play and how he needed to wait for a better pitch in that situation.”

AUSTRALIAN LONG MAN

Ausmus thought the game’s unsung star was Saupold, who stepped up after Verlander’s injury.

“That’s the second time in a row that he’s come up huge for us,” Ausmus said. “Both in Kansas City and here, he’s given us multiple innings to get us deep into a game.”

UP NEXT

White Sox: After an off day on Monday, Chicago continues a three-city road trip with three games in Tampa Bay. Jose Quintana (2-7, 5.60 ERA) is scheduled to start Tuesday’s series opener.

Tigers: Following an off day, the Tigers begin a three-game set against the visiting Angels on Tuesday. Daniel Norris (2-3, 4.47 ERA) will pitch the first game of the series for Detroit.