Phil Hughes saved the Twins $500,000 by turning down their offer to retire one more batter last season. He might have saved the Twins millions more Monday.

Hughes, who won 16 games in his first season in Minnesota, agreed to a three-year contract extension that will pay him an additional $42 million, the team announced Monday. The righthander's $8 million salary in each of the next two seasons has been increased to $9.2 million, and he will earn $13.2 million per year from 2017 to '19.

That makes the Twins' total commitment to Hughes $58 million over the next five seasons. If he remains healthy and as effective as he did in 2014 — admittedly, far from certain for a pitcher — that represents a potential discount of more than $10 million over what he might command on the open market, considering the market has been at least partially set by having five pitchers with deals that are worth more than $150 million.

"If you look at the market, it's a reasonable deal for us," said General Manager Terry Ryan, who was approached by Hughes and agent Nez Balelo about an extension in November. "It's something perceived from Phil and Nez as being fair. … But there's some risk for both parties."

More than the Twins are used to, actually; Hughes' restructured contract is the longest commitment the Twins ever have made to a starting pitcher, and they've had some bad luck in keeping their best pitchers healthy. But with two years remaining on the original three-year, $24 million deal he signed last winter, the 28-year-old Hughes chose the security of a long-term deal — and explicitly endorsed Ryan's rebuilding effort.

"I didn't want it to be a deal where I came in for three years, saw this team get back on the right track, and then [say], 'Thanks for everything, thanks for having faith in me, and see you later,' " Hughes said in a conference call to announce the extension. "I want to be part of this for years to come. I believe in the process and the direction this team is going. I'm very excited that I can be a part of that change."

Hughes himself made big changes last year, rebounding from a disappointing ending from his career with the Yankees — four consecutive seasons with an ERA above 4.00 ended with an ugly 4-14, 5.19 season — to turn in one of the strongest seasons by a Twins starter in the past decade. The former first-round draft pick posted a 3.52 ERA in 32 starts, struck out 186 batters and walked only 16, and set a major league record with a strikeout-to-walk ratio of 11.63.

"I made a lot of changes last year. I didn't feel like it was a shot in the dark and I got lucky," Hughes said of his bounceback season. "I have a more mature approach with what I wanted to do. I don't think there's any reason I can't repeat that."

Neither does his former pitching coach, whom Hughes singled out as being one of the reasons for his turnaround.

"He added a cutter, and used it on the other side of the plate a lot more, inside to righthanders," said Rick Anderson, who will be replaced by Neil Allen as the team's pitching coach next year. "That was a huge pitch for him. You could always see he had the stuff, it was just a matter of getting confidence in it. He relaxed and let his stuff work."

When late-season rain cost him a 33rd start and cut short his final appearance, he finished with 209 ⅔ innings pitched — just short of the 210 innings needed to collect a $500,000 bonus. The Twins offered to pitch him in relief during the season's final weekend, but Hughes turned down the offer, citing his desire not to risk injury.

"That made an impact on me," Ryan said. "Knowing what kind of integrity Phil has — don't think I didn't let that cross my mind. You're looking to invest in a player, you're always looking for a guy that's got makeup, and Phil has makeup. I don't think there's a better example than him giving up a half-million dollars."

His new contract has an incentive clause, too — a bonus of $200,000 for reaching 200 innings.

"If I get to 199 ⅔," Hughes said, "we'll have some discussions, I'm sure."