CHICAGO (AP) — Although he didn't think the Royals were throwing at him intentionally, Tim Anderson still took pleasure in scoring a measure of revenge.

Six innings after being beaned with a pitch from Kansas City starter Glenn Sparkman, Anderson doubled in the go-ahead run in the eighth, lifting the Chicago White Sox to an 8-7 victory over the Royals on Wednesday night.

José Abreu hit a three-run homer, Yoán Moncada also connected and the White Sox swept a three-game series for the first time this season.

Sparkman struck Anderson in the bill of his helmet in the second with nobody out, a runner on first and the White Sox leading 2-1. Anderson's helmet was knocked off his head, and plate umpire Mark Carlson immediately ejected the 27-year-old right-hander.

It was Anderson's first at-bat of the series. He had appeared as a pinch runner on Tuesday.

Last month, he was hit by Kansas City's Brad Keller in the backside after an elaborate bat flip on a home run in his previous at-bat. That sparked a benches-clearing scuffle. Keller was suspended five games and Anderson for one.

"I think it was just bad timing," Anderson said of Sparkman's pitch. "But it happened and I was able to get the hit to win the game. It was payback. It felt good, man."

Sparkman was making his second start of the season.

"Coming into this series, we had no animosity toward that young man," Royals manager Ned Yost said of Anderson. "None. And to think that we're gonna hit him on purpose is ludicrous, one, and two, it was a changeup.

"It was forgotten. He had done his part, we had done our part. It was over."

Carlson, talking to a pool reporter, said last month's incident was a factor in the decision.

"We were aware of a previous situation between the two clubs involving Tim Anderson," he said. "When the pitcher threw the ball up and in and hit him in the head, that raises an awareness to us and we have to make a decision on what we want to do to handle that situation."

Jorge Soler homered and drove in three runs for Kansas City.

Kelvin Herrera (2-3) got the win despite giving up two runs and Alex Colomé got the final three outs for his 11th save. He saved all three games of the series.

Ian Kennedy (0-2) took the loss.

HOW THEY SCORED

Moncada's two-run homer in the first gave Chicago a 2-0 lead. After Kansas City got a run back in the second on an RBI single by Soler, the White Sox broke things open with five runs in the wild bottom half of the inning.

After Sparkman was ejected, Yolmer Sánchez greeted Jorge López with an RBI single, scoring Eloy Jiménez from second base. Charlie Tilson then made it 4-1 with an RBI groundout. Abreu's three-run smash made it 7-1.

Kansas City put together a four-run sixth against a tiring Reynaldo López (career-high 118 pitches) to pull within 7-5. The Royals then tied the game with two runs in the eighth off Herrera.

UP NEXT

Royals: RHP Jakob Junis (3-5, 5.58 ERA) pitches Thursday night in the opener of a four-game series at Texas. LHP Mike Minor (5-3, 2.55) goes for the Rangers.