J.T. Realmuto slumped over behind home plate in the seventh inning Tuesday night, his left knee throbbing after being struck by a fouled-off, 101-mph sinker.

And suddenly the prospect of losing another late lead didn’t seem like the worst-case scenario anymore for the Phillies.

Realmuto finished the inning with the lead intact, then left the game. His replacement, Andrew Knapp, came up in the eighth and stroked a two-run single to open a wide enough margin for even white-knuckle closer Héctor Neris to handle in a 6-2 victory over the Nationals in the opener of a three-game series in Washington.

But then came the really good news for the Phillies. Realmuto only bruised a muscle on the inside of his knee, according to manager Joe Girardi, who couldn’t say for certain but hazarded a guess that the star catcher won’t need to be placed on the injured list.

“I’m not sure what he’s going to feel like tomorrow. My guess is it wouldn’t be great,” Girardi said. “We’ll see how it is. I can’t tell you how it’s going to respond, but the good thing is it’s muscular.”

The injury occurred at a pivotal point of a mostly tense game. With the Phillies nursing a 3-2 lead, reliever José Alvarado loaded the bases on a two-out double by Ryan Zimmerman, a 14-pitch walk to Trea Turner — one of two 14-pitch at-bats in the game — and a four-pitch walk to Juan Soto. Now he had to contend with power-hitting Josh Bell.

After taking the first pitch for a ball and the second for a strike, Bell fouled the third into an unprotected spot between Realmuto’s knee and shin guard.

“The way it hit him, luckily it hit most of the pad but still got that muscle inside of his knee,” Phillies starter Chase Anderson said. “But luckily it wasn’t the kneecap. You don’t want anybody else back there. The guy plays hard.”

Once Realmuto gathered himself, Alvarado got Bell to swing through a 101-mph sinker for the final out.

If you’re a connoisseur of the pitcher-hitter battle, the age-old test of wit and skill, then the four-hour showdown was straight out of a Norman Rockwell painting. Twelve pitchers combined to throw 370 pitches, 73 of which were fouled off. Turner’s 14-pitch walk matched a 14-pitch at-bat by the Phillies’ Jean Segura. Kyle Schwarber had one that lasted 11 pitches for the Nationals.

“There were some really long at-bats,” Girardi said. “Segi had a great one. Turner had a great one. Schwarber, I mean, just absolutely incredible. Guys battling and grinding and fouling pitches off.”

But until Knapp delivered, neither team could muster a truly clutch hit. The Phillies finished with nine hits and eight walks but went 3-for-13 with runners in scoring position. The Nationals had seven hits and four walks and went 1-for-6. The teams combined to leave 22 men on base.

» READ MORE: A Phillies trade for Kris Bryant would make more sense this year | Extra Innings

The game also seemed to turn, at least momentarily, on another decision by Girardi that would’ve been second-guessed. Leading 3-0 in the sixth inning, the Phillies loaded the bases with nobody out. Girardi allowed Anderson to bat rather than turning to the bench. Anderson lined out to left field before Andrew McCutchen struck out and Segura lost his 14-pitch battle with Nationals reliever Will Harris.

To make matters worse, Anderson, who had retired 15 of 16 batters, came out for the bottom of the sixth and gave up a leadoff homer to Turner and a walk to Soto before being lifted from the game.

“He hadn’t given up a hit since the first inning,” Girardi said. “If he doesn’t get a hit or do something, we still have two more chances. I liked the way he was pitching. Hindsight is always 20-20. But I just liked the way he was pitching.”

Said Anderson: “It’s always kind of a toss-up when you’re in a close game and the pitcher is coming up with the bases loaded, no outs. I was happy he stayed with me because I wanted to continue to pitch in the game.”

Sam Coonrod relieved Anderson and lost an 11-pitch duel with Schwarber, whose RBI single cut the margin to 3-2. The Phillies survived Alvarado’s tightrope walk in the seventh, then added on three runs in the eighth to create breathing room for Connor Brogdon and Neris to record the final six outs.

The eighth-inning outburst began with back-to-back doubles by Odúbel Herrera, who picked up two hits and reached base four times, and Alec Bohm to stretch the margin to 4-2. McCutchen and Bryce Harper walked and Knapp came up with the biggest hit of the game.

“It’s always good to add on, especially the way things have kind of been going lately,” Knapp said, referring to back-to-back losses in Atlanta over the weekend. “Just on the road in general, it’s hard to close out games so the more runs you can get to kind of separate yourself the better.”

» READ MORE: The Phillies' problem isn't Neris, Hoskins, or Nola. It's not producing more players like them | Scott Lauber

And when it was over, Knapp, like the rest of the Phillies, checked in on Realmuto.

“It just got him in a weird spot in between the pads,” Knapp said. “I’ve actually had that before. You can’t really do much about it. You just try to work on the swelling and get some fluids in you, but he’s doing good.”

For the Phillies, that was the best possible outcome.