The Nationals' Ian Desmond steals second base as Braves second baseman Dan Uggla applies the late tag in the third inning. Desmond later was an 11th-inning hero for Washington. (John Bazemore/AP)

As Ian Desmond strode to the plate in the 11th inning Wednesday night, he considered what had led to that moment. The Washington Nationals had already used 19 players. They scored two runs in the ninth against one of baseball’s nastiest closers to tie the score. Desmond had struck out two innings earlier when he had his first chance to put the Nationals ahead. With the potential winning run at third, he felt a responsibility.

“Everyone was playing so hard,” Desmond said. “Everyone’s heart was in it. I just wasn’t going to let the opportunity pass again. I had to deliver right there.”

He did. Desmond’s two-run double served as the fulcrum to the Nationals’ stirring 7-3, 11-inning victory over the Atlanta Braves, but he walked into the visitors’ clubhouse at Turner Field surrounded by heroes. There was Jayson Werth, whose two-run homer sealed the game. There were Sean Burnett and Drew Storen, who set down all six batters they faced in the ninth and 10th innings. There was Alex Cora, who provided two clutch hits, including the two-run single in the ninth that sparked a victory that materialized out of nowhere.

“It doesn’t happen every day,” said Tyler Clippard, who struck out Freddie Freeman for the last out of the game. “You know what I mean?

A two-run rally in the ninth and a four-run eruption in the 11th sent the Nationals to their grittiest victory of the season. They used every position player on their bench, played three men at third base, sent six pitchers to the mound and a seventh to first base as pinch runner and finished the game with 20 of 25 players having taken the field.

“A total team victory,” Manager Jim Riggleman said. “We just got contributions from everybody. Just an outstanding win.”

With their fourth win in five games against National League East contenders, the Nationals returned to .500, 18-18 despite one of the league’s least productive offenses. After starting this road swing by getting swept in Philadelphia, the Nationals can return home, with a win Thursday, with their first winning record on a multiseries trip since — this is true — May 2008.

“After Philly, I think we all looked in the mirror and said, ‘Hey, we got to get it going,’ ” Desmond said. “We were able to do it.”

“It tells us that we’re a force to be reckoned with, you know?” Clippard said. “We can play with anyone, and we’re gonna. We’ve been in every game this year, it feels like. It’s going to be fun. It already has been.”

The game-winning rally started when Ivan Rodriguez, the final position player from the bench, was hit by one of Scott Linebrink’s pitches. Cora followed with a single to right, bringing up Desmond. He decided he would not look for any one pitch, just react.

“That was the difference from all my other at-bats,” Desmond said. “I stopped being mechanical, and just looked for a pitch and hit it. Quit trying to be perfect.”

He saw a 1-0, 93-mph sinker from Linebrink, and he smashed it on the ground down the left field line, past Chipper Jones’s dive. Rodriguez and Cora sped around the bases, and Desmond slowed into second with a double. When Werth came to the plate, Desmond stole third on the first pitch. He slid in headfirst, popped to his feet. He flexed and screamed at his teammates in the dugout.

“That’s just pure adrenaline,” Desmond said. “It’s freaking awesome. That’s baseball, you know? You always get another chance. One hundred and sixty-two games, 600 at-bats. It’s never over.”

Werth provided the exclamation point. He crushed his sixth home run of the season, and second in two nights.

The Nationals sent the game to extra innings with a sudden rally against Craig Kimbrel, a right-hander who had struck out 22 batters in 152 / 3 innings. Laynce Nix led off the ninth inning with a single through the left side, his third hit of the night. With one out, Jerry Hairston singled to center, and pinch hitter Matt Stairs followed with a walk that loaded the bases.

Cora, the second-to-last player on Riggleman’s bench, pinch-hit next. He rolled an easy single up the middle that bounced off second base and trickled into the outfield. Nix and Hairston motored home, and pinch runner Jason Marquis — Tuesday’s starter — sped to third while Cora took second on the throw.

The rally fizzled from there, with Desmond and Werth striking out, but Desmond and Storen and Burnett and so many others ensured it would not matter. Afterward, in the Nationals’ clubhouse, players sipped Bud Lights and playfully argued about which music to blare. Some of them talked about going for a sweep.

No one would have guessed that when the Nationals left Philadelphia, nor just a few hours earlier.

“As soon as I came to spring training with this club, I could feel a different energy, a different vibe,” Clippard said. “It sounds kind of weird and cliche or whatever, but it’s true. This game is really mental, and you have to set a tone. We’ve done that this year, and we’ve stuck to it. We haven’t gotten away from it, and I don’t think we will.”