Right-hander Zack Wheeler and the Philadelphia Phillies are in agreement on a five-year, $118 million contract, sources told ESPN’s Jeff Passan.

Wheeler turned down a larger offer from the Chicago White Sox that was in excess of $120 million, sources told Passan.

Wheeler, 29, was considered the prize of the free-agency class for teams in search of starting pitching that didn’t want to compete in stratospheric bidding for Gerrit Cole and Stephen Strasburg.

The Phillies, who have a new manager, Joe Girardi, needed rotation help, and Jake Arrieta is entering the final year of his contract with the club.

Wheeler’s name has come up at the trade deadline for the past few years, but the New York Mets held on to him, and the right-hander started to fulfill some of the promise that surrounded him before Tommy John surgery derailed his career in 2015.

He has made 60 starts over the past two seasons, going 23-15 with a 3.65 ERA with 374 strikeouts in 377⅔ innings.

In 2018, he bounced back with 29 starts and had career bests in wins (12) and ERA (3.31). Playing on a one-year, $5.975 million deal in 2019, Wheeler slipped to 11 wins and a 3.96 ERA but had a career-high 195 strikeouts and ranked ninth in the National League with 195⅓ innings pitched.

Wheeler had the second-highest WAR on the Mets’ pitching staff behind Jacob deGrom last season. He relies on his fastball — he set a career high for fastball velocity in 2019 — and had a 29.4% strikeout rate on his four-seamer. He used his two-seamer more often, however, allowing a .297 batting average to opposing hitters while accumulating a 17.2% strikeout rate.

As for secondary pitches, Wheeler is armed with a very good curveball (37% percent strikeout rate), but he threw his slider (22.8% strikeout rate) twice as often in 2019.

Since entering the majors with the Mets in 2013, Wheeler is 44-38 with a 3.77 ERA and 72 strikeouts.

ESPN’s Jeff Passan and Keith Law contributed to this report.