CHICAGO — In what has been a lost season for him to this point, Chicago White Sox pitcher James Shields believes there’s still time to take something positive out of it.

Shields overcame some early struggles in a quality start on Saturday night before Whit Merrifield hit a go-ahead, two-run double in a three-run seventh inning that gave the Kansas City Royals a 6-5 victory.

“I haven’t been the spoiler too often in my career,” said Shields, a one-time Royals mainstay. “I mean, we want to be that team that finishes strong and has a good thought process going into the off-season.

“Two of my last three (starts) have been pretty good, so we’ll see how it goes.”

Shields, who helped the Royals reach the 2014 World Series, allowed three runs and four hits. He avoided his 18th loss despite moving into the major league lead with 37 home runs allowed.

The 34-year-old Shields has two years and $22 million left on his contract.

“Absolutely, I want to be here,” said Shields, who reported no issues with his recent back problem. “I’m planning on it. My contract says I’m going be back here.”

Royals closer Wade Davis gave up a single to Tyler Saladino and a double to Adam Eaton to lead off the ninth before Melky Cabrera’s infield single cut the deficit to one.

With the tying run on third and one out, Davis struck out Jose Abreu and Justin Morneau for his 23rd save as the Royals remained four games behind Baltimore for the second AL wild card.

“We had a shot at ’em,” Chicago manager Robin Ventura said. “I mean, you really don’t get that many opportunities against Wade. He proves every time he goes out there how good he is.”

Eric Hosmer hit a two-run homer in the first and Alex Gordon a solo shot in the fourth off Shields. The struggling righty exited after six innings leading 4-3 before the Chicago’s bullpen faltered.

Chris Beck (2-2) was charged with three runs while giving up two hits and a walk and getting one out.

Davis was the last of five relievers after Edinson Volquez, who allowed four runs and nine hits over five innings.

Kevin McCarthy (1-0) got the last out of the sixth and Joakim Soria struck out two in a perfect eighth to earn his first major league victory.

“I still haven’t wrapped my head around the whole being up here yet,” McCarthy said. “My head is still spinning.”

Morneau doubled twice and drove in a run in a two-run fifth as the White Sox went ahead 4-3.

Abreu drove in his 90th run and Saladino went 3 for 4 to leave him 9 for 12 in the past three games.

Volquez allowed the leadoff batter to reach in all five innings, but the Royals overcame Chicago’s 12 hits for their fourth win in 10 games.

THE MORE, THE MERRIFIELD

Merrifield, a 27-year-old rookie forced into duty thanks to Kansas City’s numerous injuries, has driven in 21 runs in 60 games.

MORNEAU’S FUTURE

Morneau, signed in June to a one-year deal, will decide after the season whether to try to play in 2016. He’s 35.

“Oh, he’s got something left,” Ventura said. “He can play next year if he wants to.”

TRAINER’S ROOM

Royals: C Salvador Perez (bruised right wrist) returned after a two-game absence. … RF Lorenzo Cain (sore left wrist) was sidelined again after he had discomfort swinging in his return Friday. The Royals say they want to wait a week before deciding if he’ll be shut down for the season. Cain declined comment after the game.

White Sox: Ventura said it’s unlikely 2B Brett Lawrie, who last played July 21, returns this season. Lawrie remains in Arizona dealing with nagging knee pain after originally being sidelined with a hamstring injury. “It’s become a long shot at this point just because he’s been out so long,” Ventura said.

UP NEXT

White Sox ace Chris Sale (15-7, 3.07 ERA) faces RHP Ian Kennedy (10-9, 3.76) in the series finale Sunday.