CHICAGO — Before he hit the home run that enabled the Phillies to finally exhale again, Nick Williams got some valuable inside information.

Williams recalled the Chicago Cubs — and starting pitcher Kyle Hendricks, in particular — attacking him with inside pitches last season. And in a pre-series meeting Tuesday, Phillies hitting coach John Mallee confirmed his suspicion. Mallee spent the past three seasons with the Cubs and shared that, indeed, the team's scouting report emphasized pounding the lefty-hitting Williams with pitches on the inner half of the plate.

So, when Williams faced Hendricks in the second inning Tuesday night, he was prepared to lay off a sinker that rode inside and was tailored to get him out. Two pitches later, Williams got a sinker over the middle of the plate and didn't miss, launching it through a whipping wind and into Wrigley Field's right-field bleachers for a two-run homer that started the Phillies to a slump-busting 6-1 victory.

"I had a plan, sitting down with [Mallee], and we just went over the scouting report based on last year, too," Williams said. "Knowing that a team pitched to your weakness, you've just got to be really, really strong in your approach."

Said manager Gabe Kapler: "John Mallee prepared Nick Williams beautifully for that at-bat where he hit the home run."

Jake Arrieta's return to Wrigley grabbed all the headlines, but this was every bit as much a homecoming for Mallee. A Chicago native and product of the University of Illinois, he was the Cubs' hitting coach in 2016 when they won the World Series. And he spent a few minutes before batting practice chatting with local reporters about the progress of several former Cubs pupils, including Javier Baez and Jason Heyward.

But Mallee's first series against his former team also represented the Phillies' offensive nadir. They had scored a grand total of five runs in their previous five games and were coming off a three-game sweep in San Francisco in which their lone run was driven in by a pitcher (Arrieta).

Mallee is still trying to coax more from his young hitters, Williams included. And if the Phillies are going to stick around in the playoff chase, they will have to hit this month. The series-opener against the Cubs began a stretch of 25 consecutive games against teams with winning records, including the Milwaukee Brewers, Washington Nationals and New York Yankees.

Save Williams' home run, the Phillies didn't hit Hendricks particularly hard. They did, however, get back to their signature approach of grinding out at-bats. In scoring three runs in the third inning, Odubel Herrera worked a seven-pitch walk before Carlos Santana saw six pitches in drawing a bases-loaded walk. Rookie Scott Kingery, elevated to the No. 3 spot in the order, reached on a bunt single in between.

"We got back to a Phillies-style of offense, worked some longer at-bats," Kapler said. "I thought Odubel's at-bat coupled with Santana's at-bat, the walk with the bases juiced, was exactly who we are as a team."

Once again, the Phillies got a strong pitching performance from a starter. This time, though, No. 5 starter Zach Eflin delivered the goods. Eflin got knocked around in his previous three starts, failing to make it out of the fifth inning each time. But he blanked the Cubs for seven innings before giving up a run in the eighth.

By then, though, the Phillies had a comfortable lead. And it all began with a big swing from Williams, who has three homers in eight games on this offense-challenged road trip.

Most of Williams' success this season has come in a pinch-hitting role. But Rhys Hoskins' fractured jaw has enabled Williams to get in the lineup on a daily basis, and his success could win him more playing time once Hoskins returns, especially considering fellow right fielder Aaron Altherr's .184 average and .638 OPS.

"We're seeing [Williams] lay off pitches outside the zone," Kapler said. "He consistently does damage on balls in the zone. If he can figure out how to stay in the zone, he's an above-average major-league outfielder. I think we're seeing signs of that."

A little inside information from his hitting coach doesn't hurt either.