The Phillies' Maikel Franco celebrates his walk-off home run Sunday. (Matt Slocum/AP)

To keep the score tied in the bottom of the ninth inning Sunday afternoon, Washington Nationals Manager Dave Martinez called on Matt Grace. The left-hander struck out the Philadelphia Phillies’ first hitter, lefty Jay Bruce, on three pitches. Then came Maikel Franco.

The right-handed slugger has struggled against left-handers in his six-year career. The Nationals had a deep, rested bullpen, and Martinez could have matched up. The manager looked at the Phillies player on deck — left-handed Adam Haseley, an unproven rookie playing his fourth major league game — and decided to stay in the dugout.

“I like Matt in that spot right there,” Martinez said.

Franco crushed a first-pitch sinker that never sank deep into the seats in left-center field to walk off the Nationals, 4-3, at Citizens Bank Park. The Nationals didn’t just lose a chance at a series sweep; the homer also dented the bullpen’s electric start to the season’s second half.

Before Grace entered Sunday, Washington’s relievers had combined for eight innings, two hits, two walks, nine strikeouts and no runs in two-plus games. In the seventh inning Sunday, after he replaced starter Aníbal Sánchez, Tanner Rainey threw six sliders and six fastballs, all strikes, to strike out the side. In the eighth, Wander Suero threw seven of his eight pitches for strikes to retire the heart of the Phillies’ lineup — Bryce Harper, Rhys Hoskins and J.T. Realmuto — in order. In the ninth, it all came apart.

“Mis-execution,” Grace said when asked what went wrong.

“I have to make a better pitch in that situation,” he continued. “Obviously, [Franco] is looking to launch in that situation, 0-0 [count] and tie game. He just took advantage of it.”

The Nationals had rallied in the seventh, pushing two runs across to even the score at 3 and give them a tie or lead in the seventh inning or later for the 22nd consecutive game. But, ultimately, the bats didn’t do enough to put the Nationals over the top.

“After a long break, to come out and win the first two games and give ourselves a chance to sweep those guys, I think that’s all you can ask for,” shortstop Trea Turner said. “They played good today, and we had a good battle, but move on and try to win the next one.”

The result was disheartening for the Nationals because their bullpen, more than any other part of the team, had seemed different from early May, when they started a skid that nearly sunk the season by dropping a Sunday finale at the Phillies, 7-1. That May 5 game unraveled after Sánchez struggled through 4⅔ innings, and the loss drew the teams’ season series even at four wins apiece. Since then, the Nationals have become a different team — and they hadn’t lost to the Phillies.

Before Sunday, the Nationals had won each of the teams’ past five meetings. They did it with a dramatic start from ace Max Scherzer with a broken nose. They did it by hammering the Phillies’ soft spots at the back of their rotation and in the bullpen. On Saturday, they did it after being down to their last out, when Juan Soto expected a splitter from Phillies closer Hector Neris, moved up in the batter’s box, got the pitch he wanted and launched it into orbit for the decisive home run.

It was fitting that, in his first start against Philadelphia since one of his worst outings of the season, Sánchez returned to close the loop. The right-hander did not overwhelm, but his outing — three runs on six hits over six innings — was good enough and exactly what his team needed.

“Sánchez kept us in the game,” Martinez said.

The Nationals are uncertain how they will handle their rotation for their upcoming two-game series in Baltimore against the Orioles. They tapped Austin Voth for Tuesday but, on Wednesday, they can start Stephen Strasburg on regular rest or bump him back a day (and into a matchup with NL East-leading Atlanta) in favor of another spot starter.

Regardless, with innings-eating workhorse Scherzer on the injured list, the Nationals need their top three available pitchers to pitch deeper into games. Sánchez delivered Sunday, and he said he could have gone out for the seventh, but his spot in the order came up in the top of the inning with his team down two runs with two on and one out.

“I feel good. I feel strong,” Sánchez said of how he felt at that point after 88 pitches. “[But] I have to hit and all that stuff. It’s the National League at the end.”

Howie Kendrick, pinch-hitting for Sánchez, delivered an RBI single, and Turner followed suit to tie it at 3. After that, though, the Nationals’ offense evaporated. Following a fielder’s choice and popup that ended the inning, all six hitters in the eighth and ninth struck out.

Just when the Nationals seemed poised to crush the Phillies and move on to their next series, against the worst team in baseball, one pitch from Grace floated too high. A reminder of what it takes to win as consistently as the Nationals have lately arrived as swiftly as Franco’s home run left the ballpark.