Gabe Kapler yanked his second best starting pitcher after just three innings Wednesday night and nearly emptied his bullpen, which is not an easy task in the era of eight relievers. It was a desperate act by a desperate manager eager to keep the Phillies afloat in a National League East race that seemed to be slipping away from them.

Lose this game and the Phillies would have been a lot closer to the third-place Washington Nationals than the first-place Atlanta Braves. Lose this game and all that talk about the Phillies' ability to bounce back from gut punches, walk-off home runs and all sorts of other maladies might be over.

Carlos Santana celebrates his fifth-inning grand slam with teammates Wilson Ramos and Roman Quinn Wednesday night.
YONG KIM/STAFF PHOTOGRAPHER
Carlos Santana celebrates his fifth-inning grand slam with teammates Wilson Ramos and Roman Quinn Wednesday night.

Instead, Kapler and the Phillies found a way to salvage the final game of their series with the Nationals, pulling out an 8-6 victory that took more than 3½ hours and required a rally from a 5-2 deficit. It was not their most aesthetic victory of the season, but it was their most needed and it allowed them to pull within 3½ games of the Braves, who lost at home to Tampa Bay.

"Sometimes it can be hard to turn the page when you've suffered losses like we have in the past couple of weeks," Jake Arrieta said after admitting he was relieved that the Phillies overcame his disastrous third inning on the mound. "It hasn't been fun, but we're still showing up ready to go and that's exactly what I anticipate for the remainder of the season – guys showing up with the intent to gain ground in our division with a chance to win it."

The Phillies had all sorts of saviors on this night. The bullpen allowed just two runs in the final six innings after squandering the lead the night before. Jose Bautista, in his first start with his new team, reached base in all four of his plate appearances and came through with a game-winning single in the bottom of the seventh after the Nationals had pulled even in the sixth.

But it was Carlos Santana, a primary target of fan dissatisfaction for most of his first season with the Phillies, who provided the biggest blast of the game. Before he came to the plate in the bottom of the fifth inning, the night was a hot mess. Arrieta had provided the Phillies with a two-run lead with a two-out single in the bottom of the second inning off Gio Gonzalez only to let it evaporate in the top of the third when he allowed a pair of two-run homers to Trea Turner and teenage sensation Juan Soto.

It took Arrieta 36 pitches to get through the third and Kapler decided he had seen enough. A parade of relievers was about to begin a seemingly endless march to the mound for the Phillies. After Luis Garcia surrendered a solo home run to Anthony Rendon, the Nats led 5-2 and it was difficult to tell if the summer air or the Phillies' season had become more stagnant.

That's when the newcomers got things going for the Phils. Asdrubal Cabrera reached on a pinch-hit single to left field and Roman Quinn, who is making a case to be Odubel Herrera's permanent replacement in center field, followed with another single. It was the second of three hits for Quinn, who is hitting .369 in 27 games.

>> IMAGE GALLERY: Photos from the Phillies' win over the Nationals

Consecutive strikeouts by Rhys Hoskins and Cesar Hernandez appeared to be rally killers, but Wilson Ramos drew a walk and Santana stepped to the plate with the bases loaded. He said Gonzalez had thrown him a steady diet of breaking balls during his first two trips to the plate. This time, the Nats' lefty fed him two straight changeups and Santana planted the second one alongside the shrubbery beyond the center-field wall.

It was his biggest hit as a Phillie.

"The fans don't know me, but I can finish strong," Santana said. "I will try to finish strong and help my team. I'm positive. We win a big game today and we're fighting. This was big, but we have to think about things day to day and not worry about the past. So we're going to be positive."

Kapler has been perpetually positive about Santana and on this night he had good reason to be.

"Everybody has a different opinion about what a really good offensive performer is and I understand that," Kapler said. "Some people pay very close attention to how many hits a guy gets and what the batting average is, which I understand. Hits are very cool. I think that getting on base, getting big hits, driving the baseball … are kind of the name of the offensive game.

"He does those things," the manager said. "It hasn't been off the charts all the time, but he has consistently gotten on base, he has consistently worked deep counts … and he has hit home runs and doubles and for me that is a good offensive performer."

Grand slams, of course, are the coolest hits of them all and the one Carlos Santana delivered Wednesday night kept the Phillies a safe distance away from the Nationals while getting them a game closer to the Braves.