MESA, Ariz. — Chicago Cubs pitcher Yu Darvish’s World Series struggles last October may have actually helped his new team in its pursuit of the righty, which ended officially on Tuesday when he signed for six years and $126 million.

The Cubs didn’t pay much attention to his 3.1 innings and nine runs given up to the Houston Astros over two starts for the Los Angeles Dodgers in the Fall Classic.

“I felt bad for him in the World Series, but I also felt it might be an opportunity if other teams overreact to that,” Cubs president Theo Epstein said during a Tuesday news conference. “We know there’s more to Yu Darvish than what happened in the World Series.

“First of all, there were a lot of reasons for what happened … from the possibility of tipping pitches, the difficulty with the baseballs and then the Astros were red-hot. They won the World Series for a reason, but I don’t think we would be doing our job if we evaluated based on a two-game sample. He’s been over here for six years. He’s proven himself as an elite pitcher.”

Darvish didn’t ignore the criticism from last fall. In fact, he took it a step further.

“There are a lot of articles that I’ve read pointing out what I did wrong, but I did well in the [previous] five games, and also it’s not just about the World Series games,” Darvish, who is from Japan, said through an interpreter. “There were parts of the whole 2017 season that I could fix. That’s what I’d like to take away.”

The sides have been working on the deal for quite some time. After getting a positive sign from agent Joel Wolfe, Cubs brass flew to Dallas in mid-December to meet with Darvish when a match first appeared possible.

“My image towards the Cubs was never bad, but it kept growing in a positive manner,” Darvish said. “Today I am honored to be with a wonderful organization as the Chicago Cubs.”

Both sides said they wanted a deal done before spring training opened, as Darvish didn’t want to be a distraction to his new teammates and the Cubs felt like a new player needs as much time to acclimate as possible. They agreed to the deal on Saturday.

“Saturday, media-wise, everyone is spending time with their family,” Darvish said, half-jokingly. “I didn’t want any attention, so I decided on Saturday.”

Darvish, 31, is a four-time All-Star. He is 56-42 with a 3.42 ERA during his career and led the major leagues with 277 strikeouts in 2013 for the Texas Rangers.

The Cubs believe they are getting Darvish at the right time — almost three years removed from Tommy John surgery and at a point in his career where his mental approach has caught up to his physical abilities.

“He’s really matured,” Epstein said. “Yu was our primary target. … He’s the pre-eminent strikeout pitcher of our generation.”

As for the time it took to get a deal done during a winter of discontent for many free agents, Darvish joked with his agent that he was ready to call it a career.

“If there is no team that meets our requirement, I’m ready to retire,” Darvish said.

Incentives can increase the total package of the deal to $150 million. The Cubs actually pushed for a sixth year with the longer-term ramifications of the competitive-balance tax in mind.