Braves right-hander Mike Foltynewicz may have been unlucky on Wilmer Difo’s infield single in the second inning, a close play that was left to stand on a replay challenge. He definitely found misfortune on Nationals outfielder Jayson Werth’s two-out, bloop single that scored a run.

In between those ill-fated plays, however, Foltynewicz walked Trea Turner on four pitches. Foltynewicz has said he’s worked on better controlling his emotions but he showed visible frustration after the sequence that led to that run.

That turned out to be just a flash of passion, not a harbinger of bad things. Foltynewicz regained his footing and struck out Daniel Murphy and then went on to finish six strong innings.

Reliever Chris Withrow blew a two-run lead in the seventh inning to cost Foltynewicz the win and the Nationals went on to win 5-4 on Wilson Ramos’ game-ending single in the bottom of the 11th. The Nationals (82-57) swept the Braves (54-86) and improved to 14-2 against them this season.

After the early trouble, Foltynewicz limited the Nationals to just two base runners from the third through sixth innings. He allowed one run on five hits over six innings with eight strikeouts and three walks.

“He was really good,” Braves interim manager Brian Snitker said. “He really just competed, left everything out there. He’s believing the stuff and he’s committed to it. He’s just coming along exactly the way we thought he would.”

.

Foltynewicz spent a month on the disabled list with bone spurs in his elbow. He returned on June 30 and had uneven results through July but lately has put together quality outings.

In his last seven stars Foltynewicz has posted a 3.40 ERA with 38 strikeouts and 11 walks over 42 1/3 innings.

“I’m really happy with the way things I’ve been going about things and getting guys out and putting guys away,” he said. “It’s been fun. I’ve been having great bullpen sessions between my starts. Everything is just kind of clicking for me and I think I’m finally there where my strength is back. I’m finally getting back to 100 percent and now it’s time to get better.”

Foltynewicz left with a 3-1 lead. After the Nationals tied it in the seventh, the Braves went ahead 4-3 in the top of the 10th, only to see the Nationals tie it again in the bottom of the inning.

Braves rookie reliever Jed Bradley walked Werth to lead off the 11th. Daniel Murphy followed with a double to right field but Werth stopped at third base. Snitker intentionally walked Bryce Harper and brought in Brandon Cunniff to face Ramos, who hit a line drive to center field for the victory.

The Nationals loaded the bases against Withrow with a walk and back-to-back singles. Lefty Ian Krol replaced Withrow and allowed a game-tying, two-run single to Daniel Murphy.

The Braves tied the game on Adonis Garcia’s RBI double in the third inning. They pushed across one run in the sixth inning after loading the bases with no outs and then added rookie Dansby Swanson’s homer in the seventh.

Bad luck turned against the Nationals in the top of the second inning an injury forced right-hander Stephen Strasburg to leave the game.

Strasburg had just been activated from a stint on the disabled list because of elbow soreness. He last pitched for the Nationals on Aug. 17, when the Rockies lit him up for nine runs before he went on the DL days later.

Strasburg retired seven of nine Braves hitters faced with four strikeouts. Swanson hit a double to lead off the third inning. Strasburg struck out the next batter, Foltynewicz, and immediately winced in pain.