Even before the Phillies got word Tuesday that star catcher J.T. Realmuto would accept their five-year, $115.5 million offer, they were trying to upgrade another position.

And until this week, there was no shortage of shortstops.

The Phillies have cast a wide net, talking with free agents Didi Gregorius, Marcus Semien, Andrelton Simmons, and Freddy Galvis, multiple sources confirmed. But Semien and Galvis came off the board Tuesday night, reportedly signing one-year deals with the Toronto Blue Jays and Baltimore Orioles, respectively.

That leaves Gregorius and Simmons, presumably for the Phillies and Reds, the last of the shortstop-needy wannabe contenders. Although the Phillies’ preference isn’t known, it has become clear that they are uninterested in merely shifting Jean Segura back to shortstop.

Segura, acquired in a trade with the Seattle Mariners two winters ago, has made 82.9% of his 1,077 major-league starts at shortstop. But the Phillies slid him over to third base and signed Gregorius last winter. Then, upon calling up top prospect Alec Bohm last season, they moved Segura to second base and pushed struggling Scott Kingery back into a utility role.

When Gregorius reached free agency in November, the Phillies considered returning Segura to shortstop. But as the offseason unfolded, and since Dave Dombrowski took over as president of baseball operations, they seemed to sour on that idea, likely in response to an icy free-agent market that was especially frigid for shortstops.

As one industry source noted, Gregorius, Semien, and Simmons averaged a total of 12.6 wins above replacement since 2017. But until Tuesday, the lone shortstop signing was South Korea’s Ha-seong Kim, who received a four-year, $28 million contract from the San Diego Padres. Two other teams traded for shortstops, the Los Angeles Angels acquiring Jose Iglesias and the New York Mets landing superstar Francisco Lindor.

» READ MORE: Do the Phillies have enough pitching to get through a 162-game season? Not at the moment.

But there’s another reason for the Phillies’ pursuit. Led by Segura in 2019, their shortstops graded as slightly below average in defensive runs saved (two runs below average) and ultimate zone rating (0.6 runs below), according to Baseball Info Solutions. The numbers were almost identical with Gregorius installed for the short 2020 season. They ranked 22nd in defensive runs saved (three below average) and 21st in ultimate zone rating (0.6 below).

Considering the Phillies’ top three starters — Aaron Nola, Zack Wheeler and Zach Eflin — tend to get a lot of ground balls, improving the infield defense can only serve to help the pitching staff.

In that case, Simmons might represent the best fit.

Simmons, 31, grew up with Gregorius on Curaçao, a Caribbean island off the coast of Venezuela. They are close friends. And as much as Gregorius needed to take a one-year deal in 2020 to reestablish his value after an injury-shortened 2019 season, Simmons figures to be in the same predicament now.

A four-time Gold Glove winner and generally regarded as the best defensive infielder in baseball from 2013 to 2018, Simmons dealt with an ankle injury that limited him to 103 games in 2019 and 30 last year. It might explain the drop in his OPS from .752 and .754 in 2017 and 2018, respectively, to .673 in 2019 and .702 last year. His defense seemed to be affected, too, at least according to the metrics. He went from 23 defensive runs saved in 2018 to 12 in 2019 and minus-2 last season.

» READ MORE: Phillies’ Jorge Velandia blazing trail for Venezuelans in baseball front offices

But one National League scout warned against putting too much stock in a 30-game sample. While the scout conceded that it’s possible, perhaps even likely, that Simmons’ range has diminished with age, he has been so elite that any regression is relative. From 2013 to 2019, Simmons had 141 defensive runs saved in 8,451 1/3 innings. The next-best shortstop, San Francisco’s Brandon Crawford, had 65 in 8,701 1/3 innings.

“He still may be the best defender in either league, and if he’s not No. 1, he’s 2 or 3,” the scout said of Simmons. “And I’d have to be convinced that there’s someone better.”

Gregorius, who turns 31 next month, represents a less risky option. He was the Phillies’ most consistent hitter last season (.284, 10 homers, .827 OPS), and as a left-handed hitter, he fits nicely with Bryce Harper in a batting order that otherwise tilts to the right. Manager Joe Girardi also lauded Gregorius for his upbeat personality and influence on the clubhouse.

“I just think it’s the attitude that he brings,” Girardi said at the end of last season. “You see more and more of it as time goes on. When you come into a clubhouse for the first time, it’s not always so easy to be yourself and ask other players to do certain things. But he’s gotten more and more comfortable as time went by.”

But Gregorius is aiming to parlay a one-year contract into a multiyear deal. The Phillies might prefer a one-year shortstop fix.

They have $106.5 million already tied up in luxury-tax commitments for 2022, including Realmuto’s $23.1 million average annual salary. Shortstop prospect Bryson Stott is on the way, and there’s a potentially star-studded free-agent shortstop class next winter (Lindor, Carlos Correa, Corey Seager, Trevor Story, and Javier Baez are eligible).

Regardless, the Phillies seem intent on keeping Segura at second base and Kingery in a utility role. There are still enough shortstops to choose from to make that happen, albeit not as many as when the week began.