CHICAGO (AP) — Matt Davidson hit a solo homer and a tiebreaking sacrifice fly, helping Lucas Giolito and the Chicago White Sox salvage the finale of their weekend series against the crosstown Cubs with a 5-3 win on Sunday.

Giolito (2-4) matched a career high with seven walks, tossed three wild pitches and hit a batter, but pitched two-hit ball for 5 2/3 innings in his first victory since April 26.

The right-hander allowed three runs and struck out three while lowering his ERA to 6.91 for the season.

The White Sox (10-27) stopped a seven-game slide and became the last major league team to reach 10 wins.

Yolmer Sanchez, Nicky Delmonico and Leury Garcia each drove in a run, and Bruce Rondon finished a nearly perfect relief effort for his first save.

gettyimages 958127470 Sox Beat Cubs 5 3, Avoid Sweep

CHICAGO, IL – MAY 13: Starting pitcher Kyle Hendricks #28 of the Chicago Cubs delivers the ball against the Chicago White Sox at Wrigley Field on May 13, 2018 in Chicago, Illinois. (Photo by Jonathan Daniel/Getty Images)

Javier Baez drove in two more runs for the Cubs (21-16), who had won five in a row. Kyle Hendricks (3-3) surrendered four runs, three earned, and six hits in six innings.

Willson Contreras’ throwing error on the catcher’s 26th birthday set up Sanchez’s tying RBI single in the third, but the Cubs regained the lead on Ian Happ’s RBI double off the wall in right-center in the fourth.

Happ’s hit put runners on second and third with no outs, but Addison Russell was caught off third on Hendricks’ bouncer to third and Ben Zobrist grounded into an inning-ending double play.

That blown opportunity proved costly when the White Sox rallied for two in the sixth.

Jose Abreu singled with one out and scampered home on Delmonico’s triple to right-center. Davidson drove Hendricks’ next pitch to the warning track in center, providing plenty of time for Delmonico to tag up for a 4-3 lead.

The South Siders added an insurance run on Garcia’s RBI single in the seventh, and the Cubs were unable to rally after scoring 19 times in the first two games of the series.

Jace Fry, Nate Jones and Joakim Soria and Rondon combined to retire 10 of the last 11 batters.

Pinch-hitter Tommy La Stella singled with two out in the ninth, but Zobrist flied out to center to end the game.

Giolito was just 1-4 with a 9.00 ERA in his previous four starts coming into the day, and he almost didn’t make it out of the first.

Baez lined a two-run single into left-center with two out, giving him 36 RBIs in 36 games. Kyle Schwarber then walked and swiped second as part of a double steal — two of five on the day for the Cubs — but Giolito struck out Russell looking to end the inning.

gettyimages 958124654 Sox Beat Cubs 5 3, Avoid Sweep

CHICAGO, IL – MAY 13: Starting pitcher Lucas Giolito #27 of the Chicago White Sox delivers the ball against the Chicago Cubs at Wrigley Field on May 13, 2018 in Chicago, Illinois. (Photo by Jonathan Daniel/Getty Images)

TRAINER’S ROOM

White Sox: 2B Yoan Moncada (left hamstring tightness) ran and took batting practice before the game. Manager Rick Renteria said he could be activated when he is eligible to come off the disabled list on Tuesday.

Cubs: OF Jason Heyward is eligible to come off the seven-day concussion list on Monday, but manager Joe Maddon said he won’t be activated just yet. “We’re still working through the whole thing right now,” Maddon said. “Still waiting to hear back from the doctors.” Heyward is expected to travel with the team to Atlanta for the start of a seven-game trip. … RHP Yu Darvish (virus) remains on track to pitch Tuesday against the Braves.

UP NEXT

White Sox: Following an off day, RHP Reynaldo Lopez (0-2, 2.44 ERA) starts Tuesday night in the first of two games in Pittsburgh. RHP Trevor Williams (4-2, 3.13 ERA) pitches for the Pirates.

Cubs: LHP Jose Quintana (4-2, 4.42 ERA) faces Braves RHP Julio Teheran (3-1, 3.14 ERA) on Monday in the makeup of an April 15 rainout. After the game at Wrigley Field, the teams travel to Atlanta for three more games beginning on Tuesday night at SunTrust Park.

© 2018 by STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited.