Chad Tracy gets doused by jubilant teammates after his 13th-inning at-bat, resulting in a Braves error, wins the game for the Nationals. (Katherine Frey/THE WASHINGTON POST)

This magical Washington Nationals season took a strange turn on Monday night and into early Tuesday morning. They hosted the Atlanta Braves in the first game of the biggest series of the season to date, a showdown between the best two teams in the NL East. It was pennant race baseball in Washington in the late summer, though it was delayed an hour by rain before the first pitch.

Then, 13 innings of exhausting baseball happened. The Nationals took a first-inning lead — which they blew by the fifth — and then didn’t score again until a curious play ended it. Danny Espinosa, already on third base because of alert base running, broke home on a groundball by Chad Tracy that ate up Braves second baseman Dan Uggla, who was also frozen by runner Kurt Suzuki at first base. The Nationals won, 5-4, their ninth walk-off win of the season.

With the victory, Washington moved six games ahead of Atlanta and 30 games over .500 for the first time this season.

A mercilessly long game in which nearly everyone played had finally come to an end. Balls that could have ended the game landed inches from the fence and into fielders’ gloves for outs. Twenty-six runners were stranded on base. One reliever was left for either team. Starter Edwin Jackson, who tossed 103 pitches on Saturday and was scheduled to start Friday, warmed up in the bullpen after agreeing to lend a hand. In all, 37 players entered the game.

A pennant race isn’t always pretty.

“If it swings the other way, sure, you don’t sleep as well tonight,” Tracy said. “There’s a little more pressure on you tomorrow. That’s the way to set the tone for the series. We would have liked to have been out of here in nine innings but hey, we’ll take the win.”

Ian Desmond led off the 13th inning at 12:22 a.m. on Tuesday morning with a single. Espinosa’s bunt pushed the ball towards reliever Cristhian Martinez, who tossed out Desmond at second base by a step. Suzuki chopped a change-up high over the pitcher’s mound.

Shortstop Paul Janish and third baseman Chipper Jones charged the ball, but kicked it away. There was no play at first base. As Jones tried to find the ball, Espinosa rounded second and took third base. That heads-up play would prove to be the difference in the game. There were runners at the corners with one out.

With runners in scoring position, Nationals Manager Davey Johnson pulled reliever Craig Stammen back and sent Tracy to the plate. Stammen had tossed two scoreless innings and had at least one more in him. If the Nationals didn’t score, Jackson was likely his replacement in the 14th inning.

“I wasn’t doing it for heroism,” Jackson said. “But the bullpen was done. It was a game that we could possibly win.”

Which Tracy did before Jackson could enter the game, drilling a ball to Uggla’s left. Uggla dived, stopped it and popped up to his feet. By then, Espinosa, who broke home on contact, had nearly scored. Suzuki baited towards second base and stopped a few feet from first. Uggla froze. The ball squirmed out of his hand and to the ground. Everyone was safe and the game was over.

“I saw him dive and I thought I was going to have a pretty good shot,” Espinosa said. “It was going to be a tough play for him to get up and try to throw me out. But I thought I had a good chance once I saw him dive. I thought I could beat it.”

No error was credited, but it felt like one.

“If I had a do-over, I would’ve jumped up, found [Suzuki] and tagged him and run and touched first,” Uggla said.

Both were teams in this position in the 13th inning because of a multitude of missed opportunities. These games against the Braves have been defined by each team’s haymakers. Monday began like another back-and-forth affair. Then, neither team could deliver a final blow.

After Atlanta picked up a run in the first inning, the Nationals punched back by scoring four runs in the first inning against right-hander Tim Hudson. In their 13 games this season, the Nationals have outscored the Braves, 23-4, in the first inning. The rest of the game, however, was completely different.

Desmond, in an 0 for 11 slump since returning from injury on Friday, punctuated a four-run first inning when smashed a slider over the visiting bullpen for a two-run home run — his 18th, a franchise record for a shortstop.

Given the chance to add to a lead, the Nationals stumbled. They put the lead runner on in three of the following six innings and had no more runs to show for it. They stranded 12 base runners. They went 3 for 12 with runners in scoring position. Hudson grew more comfortable as the game progressed. The Nationals could manage only three hits against him after the first inning. Twice the Nationals had two runners on base at the same time but couldn’t push any of them across home plate.

Adam LaRoche brought the crowd to its feet when he slammed a ball high and deep to the right field wall for an out in the 10th inning. Jayson Werth did the same an inning later. The chances were there, within their grasp, and the Nationals couldn’t quite take advantage of them.

Bryce Harper smashed his bat onto the ground after an 11th-inning strikeout on a curveball. After a 12th inning pop-up, the usually reserved LaRoche tossed his bat frustratingly to the side. Breaking balls became harder to hit. Players swung out of their bodies, hoping to end it all with one swing. There were some mistakes, too: two missed defensive plays by Desmond could have proved costly.

“If you’ve been watching the emotions of the players, it was almost like a playoff game because we made high-energy mistakes,” Johnson said.

The Nationals wiggled out of their own jams. They overcame a mediocre start from starter Jordan Zimmermann, who battled his own command issues. He allowed the Braves to tie the score at 4-4 in the fifth inning. Relievers Tom Gorzelanny, Ryan Mattheus and Drew Storen combined to walk five batters, but allowed none of them to score. Sean Burnett worked around two singles in the ninth.

“A lot of us have never played in an important baseball game since like college or high school or maybe the minor leagues,” Stammen said. “So I think it’s important to get a little nervous or anxious, a little more adrenaline going on. I think it’s definitely important to play games like that.”

After the Nationals topped the Braves, there was little celebration. Espinosa slid into home plate and met Werth with a slowly-executed hug. Players grouped around them. But there was none of that wild scampering and jumping common after a walk-off win. The ball that Uggla dropped sat alone on the infield grass. The Nationals were tired. An exhausting game was over. Another pennant race game would be played later Tuesday.