The Chicago Cubs and free agent ace pitcher Yu Darvish have agreed to a six-year, $126 million deal, a source confirmed to ESPN’s Jesse Rogers.

The agreement was first reported Saturday by The Athletic, which also reported that Darvish can earn up to $150 million over the life of the contract.

Darvish had been one of the most coveted pitchers in this year’s free-agent market and also reportedly received a substantial offer last month from Chicago’s division rival, the Milwaukee Brewers. The Japanese right-hander also had been linked to the Rangers, Dodgers, Yankees, Twins and Astros this offseason.

He has averaged 11 strikeouts per nine innings over his career, which is the highest ratio in MLB history for pitchers with more than 100 career starts — ranking just ahead of Randy Johnson and Chris Sale, who are tied for second at 10.6.

Darvish was acquired by the Dodgers from Texas for three prospects just before last year’s trade deadline, supposedly the final piece needed to return a championship to baseball’s biggest-spending team.

But the 6-foot-5 right-hander only managed four outs in losing Game 7 to the Astros, becoming the second pitcher in World Series history with less than two innings pitched in two starts.

According to ESPN Stats & Information, Darvish has a 2.42 ERA in eight career starts against the NL Central, including the postseason. He has never allowed more than three earned runs against an NL Central opponent.

Darvish signed with Texas before the 2012 season and missed all of 2015 after elbow surgery. In 31 combined starts last season, he was 10-12 with a 3.86 ERA.