Lucas Giolito was all over the place, but somehow he found a way to pitch around seven walks, three wild pitches, a hit batter and five stolen bases to give the White Sox a 5-3 victory Sunday against the Cubs at Wrigley Field.

How badly did the Sox need this one? They had hit rock bottom with a 9-27 start and came into the last game of a three-game series against the Cubs with seven consecutive losses and 11 in their last 12 games.

RELATED STORIES
Renteria to White Sox fans: Don’t lose sight of where we’re headed
Too little, too late for White Sox’ James Shields in loss to Cubs

“I was just out of sync, and stuff was kind of flying all over the place,’’ said Giolito (2-4, 6.91 ERA), who threw exactly half of his 100 pitches for strikes and missed his target by a foot or more on numerous occasions in 5‰ topsy-turvy innings. “But I just stuck with it. I kind of feed off that energy from the crowd, from my teammates, so it’s definitely a really fun one. The Cubs-White Sox rivalry is pretty awesome, and it was cool to get my first experience of that.”

Giolito labeled it a good team win, and it was with Matt Davidson hitting his second homer in two games and driving in the go-ahead run with a sacrifice fly against Cubs right-hander Kyle Hendricks and Nicky Delmonico belting a tying RBI triple off the wall and scoring the go-ahead run on the offensive side. Left-hander Jace Fry pitched 1„ scoreless innings, Nate Jones pitched a perfect eighth and Bruce Rondon (two strikeouts) a scoreless ninth to nail it down and collect his first save.

“Huge, huge,’’ manager Rick Renteria said. “Those guys are enjoying this victory, to say the least. It was certainly a confidence-builder, to say the least.’’

“It means a little more against the Cubs because there are two teams in the city, and we want to be the better team,’’ Jones said.

Jones was still smarting from giving up four runs and blowing a three-run lead to the Pirates in the ninth inning in his last outing. He passed on using his sinking two-seam fastball and introduced a four-seamer, something he had been toying with on the side, against the Cubs.

“First time,” said Jones, who struck out Willson Contreras and retired Javy Baez and Kyle Schwarber. “It worked like it’s supposed to. We’d been working on it and got to showcase it today, and from the reaction of the hitters, it was good.’’

Renteria stopped short of saying Rondon, who had seven career saves with the Tigers and 90 in the minor leagues, is his new closer.

“Every time I go out there, my mindset is like a closer,’’ he said.

Moncada set to return

Second baseman Yoan Moncada tested his hamstring with agility drills and running and took batting practice and ground balls to inch closer to a likely return from the disabled list when the Sox open a two-game interleague series Tuesday in Pittsburgh against the Pirates.

“He’s doing very, very well, and we’re hoping he’ll be back in the lineup soon,” Renteria said.

The Sox optioned infielder Jose Rondon to Class AAA Charlotte after the game to make room.

A bittersweet Mother’s Day

Renteria teared up, smiled and politely ended his Mother’s Day dugout session with media when asked about his mother, Angela, who passed away April 25 at 91.

“She was awesome,’’ he said.