Joe Girardi walked out of the dugout Wednesday night, appearing ready to make a pitching change after the first two hitters reached in the ninth inning against Phillies starter Zack Wheeler.

Wheeler’s pitch count had spiked to 99 and runners were on second and third with no outs in a tie game. Girardi had pushed Wheeler into the ninth inning of a 7-4 loss to Tampa Bay despite having finished the eighth with with 93 pitches.

The manager has been aggressive this season with Wheeler, who leads the majors in innings. Wheeler’s velocity was still humming and he struck out 10 batters in eight innings. It was a chance to be aggressive. But this seemed like the end of the line.

Except Girardi was on the field to argue a call, not make a pitching change. The call -- Girardi thought Kevin Kiermaier’s double down the left-field line was foul -- stood, Wheeler remained in the game, and the next batter hit a home run that scorched off his bat at 110.1 mph.

“I still liked his stuff and his stuff is as good as anyone who we have,” said Girardi, who removed Wheeler immediately after the three-run homer by Francisco Mejia. “That’s a judgment on my call. It didn’t work, but I still liked his stuff.”

The loss dropped the Phillies to .500 and five games behind first-place Atlanta with 36 games to play. Baseball Prospectus pegs Atlanta to win the National League East with 87 wins. The Phillies would have to finish the season 24-12 to reach 87 wins.

“Obviously, we have to pick it up,” said Wheeler, who gave up 10 hits but no walks. “We had a good spell. We had a little bad spell. We’ve been talking about consistency the whole year. We just need to find that, especially down this last little stretch right here. It’s big, obviously. We know that. You guys know that. Everybody knows that.”

Wheeler told Girardi before the ninth that he felt fine. “Obviously, I was a little tired,” Wheeler said after the loss, but he said he had enough to handle the ninth. Yandy Diaz led off with a hard-hit single to right field before Kiermaier’s double bounced just over the third-base bag.

But that was not enough for Girardi to use his bullpen. Instead, he allowed Wheeler to face Mejia. And the game was no longer tied.

“The one that he hit out, I was trying to go up and away. It was up. It wasn’t where I wanted it,” said Wheeler, who allowed 0-2 hits to both Kiermaier and Mejia. “Sometimes you have to give the guys credit. It stinks to do it, but you have to do it sometimes. I didn’t execute like I fully wanted to. And then Kiermaier, I thought I could sneak it by him out there because we were pounding him in the whole game. I don’t know. It was away, but it either has to be up or paint it down.”

It was the second time in four games that Girardi stuck with his pitcher when trouble arrived in the ninth inning. Aaron Nola, two innings after losing his bid for a perfect game, remained in the game on Saturday in San Diego after his pitch count eclipsed 100. His career-high 117th pitch resulted in a two-run tying homer.

That was a different situation, Girardi said, as he pushed Nola on Saturday in hopes of resting his bullpen following a taxing night. The motivation might have been different, but the results were the same.

“I thought his stuff was still good,” Girardi said. “He has the ability to get strikeouts. He had done a good job against Mejia all night, expanding the zone on him and having him chase. He just made a mistake.”

History for Wheeler

Wheeler became the first major league pitcher this season to reach 200 strikeouts and is just the third Phillies pitcher to reach that milestone in his first 26 games of the season. Wheeler struck out 10 in eight innings. Curt Schilling (1997, 1998) and Steve Carlton (1972) also had 200 strikeouts through 26 games.

This is Wheeler’s first 200-strikeout season and he joins Nola, Cliff Lee, Cole Hamels, and Roy Halladay as the only Phillies with a 200-strikeout season in the last 10 years.

The defense rests

Shortstop Freddy Galvis was one of baseball’s better defenders when he last wore a Phillies uniform, so perhaps it was fitting on Wednesday night that he was charged with a throwing error on the first ball he fielded since returning to the team. Galvis fit right in.

There are several reasons why the Phillies have hovered around .500 this season and Wednesday provided another reminder of just how costly the defense has been. Galvis botched a throw, Andrew McCutchen dropped a fly ball in left field, and Rhys Hoskins seemed to be limited by his sore groin as he missed three plays at first base. The defense did Wheeler no favors.

“Cutch lost the ball in the lights and it happens in that area with the balls that are down, but we would’ve gotten a double play if he was able to catch it,” Girardi said, since Wander Franco was nearly at third base by the time McCutchen dropped it. “You lose the ball in the lights and there’s not a whole lot you can do.”

Galvis’s throw proved harmless as Wheeler escaped the inning, but McCutchen’s error allowed a run to score in the fourth and Hoskins’ defense that inning kept Tampa’s rally churning. The Phillies entered Wednesday with baseball’s worst defensive runs rating and are on pace to make nearly 100 errors.

“It’s extremely frustrating. But if you make mistakes against this team, they make you pay,” Girardi said. “That’s exactly what they did.”

Hoskins’ blast

Hoskins’ defense was costly, but he made up for it with a tying homer in the eighth. It was Hoskins’ third homer in eight at-bats since returning from the injured list as he has shown in his first two starts just how much the offense missed him while he was on the injured list.

The Phillies need Hoskins in the lineup, but the plan is still for him to only play every other game while his groin -- which is clearly bothering him -- heals. Girardi said before the game that Hoskins might still be on the injured list if it was May and not August.

“I think that’s why we’re trying to protect him as much as possible and get him as many at-bats,” Girardi said. “He’s giving everything he has. Let me tell you: I give Rhys a lot of credit because he’s really gutting through this.”