Left fielder Kevin Frandsen makes a textbook two-handed catch of David Wright’s fly ball to end the sixth inning Wednesday. (Frank Franklin II/Associated Press)

Rafael Soriano tugged the jersey out of his pants with two emphatic yanks, the last act of a night none of the Washington Nationals wanted to relive. They committed three errors, including the botching of a routine fly ball. They flailed against a 41-year-old with a beer gut and a frenetic fastball. They needed to throw out a runner at the plate in the ninth and hold their breath during a replay review. They watched with a hand over one eye as their closer endured a shelling. And they won.

The Nationals may not have wanted to remember much of their 3-2 victory Wednesday night over the New York Mets. But in the moments after Soriano survived and deep exhales filled the visitors’ clubhouse at Citi Field, they savored the win like any other — and maybe more. Every rotten play had preceded a clutch moment, from Kevin Frandsen’s go-ahead sacrifice fly to Drew Storen’s high-wire escape to Ian Desmond’s game-saving play in the ninth. It wasn’t easy. It wasn’t pretty. It counts the same.

“If you want to win a pennant,” Storen said, “you got to win some of these ugly games, too.”

The Nationals remained five games ahead of the Atlanta Braves in the National League East as they continued their dominance over the Mets. The Nationals improved to 24-4 in their past 28 games at Citi Field. They’re 9-2 against New York this year. Their ability to hold off the Braves may hinge on their ability to throttle the Mets; eight of the Nationals’ final 44 games, including Thursday night’s series finale, are against them.

“When you go in knowing you’ve had a good recent track record against a team, it gives you a little bit of extra confidence,” first baseman Adam LaRoche said.

The Post Sports Live crew overanalyzes Bryce Harper's motivation in walking through the Braves' "A" logo at home plate at Turner Field. (Post Sports Live/The Washington Post)

Their romps over the Mets have typically been devoid of harrowing moments, like the entirety of the ninth inning. Afterward, in the Nationals’ clubhouse, Soriano leaned over to Jordan Zimmermann, who earned the win by allowing no earned runs in 61 / 3 innings. “I almost [messed] it up,” Soriano said.

Soriano yielded an immediate home run to Travis d’Arnaud, slicing a two-run cushion in half. Matt den Dekker smashed a single to center field. The Mets gave Soriano a gift when Juan Lagares popped up a bunt attempt, but the hail of liners continued when Wilmer Flores scorched a single to center.

“Just the ball up in the zone,” Manager Matt Williams said. “Missed location. Just a little off. Regular work is key for guys, but sometimes in the closer’s role, you don’t get it.”

Pinch runner Eric Young Jr. promptly stole second, which put runners on second and third with one out. The infield crept halfway in with pinch hitter Eric Campbell at the plate. He chopped to short, and Desmond fired home to nail den Dekker at the plate by several feet. Mets Manager Terry Collins asked for a review based on Rule 7.13, the new rule that prohibits catchers from blocking the plate. Baseball has seen several odd reversals concerning the rule, but the umpires ruled Wilson Ramos had conformed after a quick look.

“It’s borderline, but the throw took him into the runner,” Williams said. “He’s got to move to catch the ball. I think the call is right because the throw took him kind of into the runner.”

Soriano needed only one more out. Curtis Granderson ended the game with a bouncer back to Soriano. Soriano flipped to LaRoche and tore the jersey out of his pants, his 27th and perhaps most excruciating save complete.

“You play a little bit of a sloppy game or run into a tough pitcher, you can come out of there feeling like you stole one,” LaRoche said. “You do that a few times, those are big games.”

The Post Sports Live crew discusses whether Alex Rodriguez will return to the Yankees next season when his suspension for his connection to Tony Bosch and Biogenesis ends. (Post Sports Live/The Washington Post)

Soriano’s escape wasn’t even the best of the night. That honor belonged to Storen, whose performance in the seventh inning mattered more than any one player’s Wednesday night.

Zimmermann cruised into the seventh with a 2-1 lead, having used his fastball to conquer personal nemesis Daniel Murphy for one night. The Nationals made a hash of the inning. LaRoche got caught between hops on Lucas Duda’s leadoff ground ball, and it scooted through his legs for an error. With one out, den Dekker singled.

With Lagares at the plate, Ramos tried to pick off den Dekker at first. Problem was, LaRoche wasn’t holding him on, and the ball rolled down the right field line. “A little missed communication,” LaRoche said. “Typically, I get them through my earpiece, and it must have shorted out.”

Zimmermann proceeded to hit Lagares square in the back with his 86th pitch, a fastball, and load the bases. Williams took the ball from Zimmermann and summoned Storen. He carried a 1.67 ERA to the mound, but he had inherited 16 base runners this season and allowed eight of them to score. Now he faced his toughest jam.

“He’s our guy,” Williams said. “He’s been the guy all year.”

Flores walked to the plate. The infield moved in. Storen rifled a 95-mph sinker that darted over the inside corner, and Flores hit a dribbler toward third. Anthony Rendon charged, scooped the ball and fired home for the inning’s second out. Storen struck out pinch hitter Kirk Nieuwenhuis with a 2-2 change-up, his key offspeed pitch to lefties. He skipped off the mound and pumped his fist.

“Those are the fun spots,” Storen said. “In the seventh inning, you’re going to have those situations. Honestly, I haven’t done a great job of it this year. That’s something that I really try to take pride in because those aren’t my runs.”

The Nationals fell behind 1-0 after Frandsen dropped a simple fly ball in the fourth inning. Right-hander Bartolo Colon, an exercise ball with limbs, erased rallies and flummoxed the Nationals with his variety of fastballs, darting and cutting to every corner at fluctuating speeds. “He can paint, man,” Williams said.

The Nationals started to solve him in the seventh, when LaRoche led off with a double. Bryce Harper scored the Nationals’ first run with a sacrifice fly. With one out and Desmond on third, Frandsen came to the plate with a chance to redeem his gaffe.

“You can dig yourself a hole,” Frandsen said. “Or you can be a man and step up.”

Frandsen flied to left and gave the Nationals the lead. Asdrubal Cabrera helped preserve it with a crucial home run, his first as a National. He also made a catch in foul territory, tumbling over the fence after a 100-foot sprint. The Nationals had played well only when it mattered, but they had played just well enough to win.

“We don’t want to do that,” Williams said. “We’re going to have games like this every once in a while. The fact that we were able to overcome it is key.”