After weeks of talks with interested teams desperate for pitching in a barren market, the Phillies reached Monday's trade deadline with the realization that they valued Jeremy Hellickson more than anyone else.

By not trading the veteran pitcher, they are willing to take a $17 million risk on him. Either Hellickson nets them a high draft pick or becomes one of the highest-paid pitchers in franchise history next season.

"We have some younger pitchers that are going to be approaching innings totals for the season that they have never approached before," Phillies general manager Matt Klentak said. "To me, having a veteran starter that is able and capable of giving us six or seven innings a night to continue to allow our young starters to develop the way that we want them to - there's a huge value in that to us."

The trade deadline passed without action from the Phillies. They did not have major pieces to move; teams were not heavily interested in closer Jeanmar Gomez despite his 2.77 ERA and 27 saves because he a pitcher who relies on contact, not velocity. Peter Bourjos, another potential trade chip, was injured before the deadline. Reliever David Hernandez has been ineffective. Those players could still move in August as a part of a waiver deal.

Hellickson, ever since the Phillies acquired him last December, figured to be a tradable asset. The 29-year-old righthander has a 3.70 ERA in 22 starts and has pitched his best baseball in recent weeks. The Phillies had insisted they were under no obligation to trade Hellickson, and they were not. He has provided steadiness to a young rotation.

He is, however, Jeremy Hellickson. He had a 4.86 ERA in 71 starts over the three previous seasons before coming to the Phillies. He is regarded as a league-average pitcher. The Phillies will not build around the soon-to-be free agent.

A source said the Phillies were seeking a return comparable to a second-round draft pick because they believe that is what they will gain by retaining Hellickson until November, when they can make him a qualifying offer that he could reject.

That is not guaranteed.

"We were pretty focused [on] appropriately balancing the present and the future," Klentak said. "If there was a trade to be made that made sense on both fronts, we would have done it. . . . Never once did I feel that the appropriate balance would be struck in a return of a trade."

The value of the qualifying offer, which is expected to be worth $16.7 million this winter, is determined by averaging the league's 125 contracts with the highest mean salaries. It must be offered within five days of the conclusion of the World Series. Players have a week to decide whether to accept.

The Phillies are willing to risk it based upon two factors: There is a dearth of good pitching available through free agency this winter and Hellickson's agent, Scott Boras, is wont to prefer a long-term contract.

But this gamble by the Phillies assumes that Hellickson will maintain his current level of pitching for the season's final two months. It's not that the Phillies lack the payroll to devote a significant sum to Hellickson; it is a debate about whether that allocation is prudent.

"We have very supportive ownership and very few future commitments," Klentak said. "The fact that Hellickson would cost $7 million or $16 million or something in between - that's something we're able to explore. I'm not going to suggest we will or we won't at this early stage, but it was part of the calculus to be sure."

That calculus is complicated. If Hellickson were to reject the $16.7 million offer, he would do it because he thinks he can find a larger guarantee with a longer term. But once Hellickson receives the qualifying offer, he is attached to draft-pick compensation. That could limit his market.

A team that signs a player who rejected a qualifying offer must forfeit its top unprotected pick. For most, that is a first-round selection. The Phillies would receive a compensation pick between the first and second rounds.

Since the qualifying-offer system was instituted before the 2013 season, 51 of the 54 players to receive one have rejected it. All three to accept did so last winter.

Brett Anderson, a righthander who posted a 3.69 ERA in 31 starts last season as a 27-year-old starter, accepted the Dodgers' qualifying offer for 2016. Catcher Matt Wieters, a Boras client, accepted Baltimore's qualifying offer last winter rather than hitting the open market. Both Anderson and Wieters carried concerns about injuries.

The durable Hellickson would enter free agency as one of the better available pitchers. His age (30 next April) is favorable when compared to other free-agent pitchers like Rich Hill, Doug Fister, Bartolo Colon, and Jake Peavy. League-average pitchers are valuable; St. Louis spent $80 million last winter on Mike Leake, who had comparable numbers to Hellickson but was two years younger and not tethered to a draft pick.

If a team was unwilling to surrender second-round talent now to rent Hellickson, would it sacrifice a high draft pick and spend a large sum in a long-term deal to procure him? That is a bet the Phillies made on Monday.

mgelb@philly.com

@MattGelb