On a day when Stephen Strasburg was utterly dominant, the Braves still made things interesting Sunday but couldn’t pull off a sweep of the division-leading Washington Nationals.

Dansby Swanson had a two-run, two-out double in the eighth inning to pull the Braves within a run and chase Strasburg from the game, but the Nationals held on for a 3-2 victory at SunTrust Park, avoiding being swept by the Braves in their first series since Atlanta slugger Freddie Freeman fractured his left wrist and went on the disabled list.

Strasburg had a season-high 11 strikeouts with one walk in 7 2/3 innings and the Braves lost for just the third time in their past 10 games. He’s 5-0 with a 1.34 ERA in his past five starts in Atlanta including two this season.

“It was a good series,” said left fielder Matt Kemp, who helped the Braves win games started by the Nationals’ Gio Gonzalez and Max Scherzer before they came up short against a peak-form Strasburg. “Those guys have been pretty much owning us since I’ve been here. That was good to face three really tough pitchers that have pitching well.

“We came up short, but I’m proud of the guys in the series and hopefully that carries on into the next series.”

Swanson struck out in each of his three plate appearances Sunday against Strasburg before coming up to face him in the eighth with two out and runners at first and second, trailing 3-0. After working the count full, he hit a line-drive foul to left field and a foul to right before driving a ball off the right-center wall above the glove of a leaping Bryce Harper.

“Strasburg had been unbelievable all day,” Swanson said. “You look up and he’s throwing probably 85 percent strikes, and you look at how many balls we actually put in play hard and it was very limited. He was mixing up his pitches and putting them where he wanted them. When a guy’s got that good of stuff and that good of command, you’ve just got to try to grind out at-bats. Luckily I was able to come through and get us closer, but it’s just one of those days where you’ve just got to take what you get with him. Nice to be able to battle back and put ourselves in position to win.”

Swanson’s big hit cut the lead to 3-2, scoring Rio Ruiz, the rookie who hit a two-run homer Saturday and drew a one-out walk in the eighth inning Sunday, and Ender Inciarte, who singled to left with two out. Strasburg was replaced at that point by reliever Koda Glover, who struck out Nick Markakis to end the inning.

It was a hard-luck result after arguably the best outing from Braves starter Jaime Garcia (1-3). He pitched a season-high eight innings and gave up seven hits and three runs including two unearned runs. The left-hander had eight strikeouts and walked none for the first time this season, after issuing 14 walks in his previous three starts.

“That’s a tough loss,” Garcia said. “I felt pretty good physically, like I was in control of the game for the most part. But at the end of the day we didn’t get the W against a good team, good lineup, good pitcher.”

Part of the hard luck was of his own doing as the Nationals scored two unearned runs in the third inning after consecutive errors, first by right fielder Nick Markakis — a missed fly ball at the warning track for a two-base error to start the inning — and then Garcia when he failed to field a grounder in front of the mound.

“(Garcia) threw the ball well,” Markakis said. “It shows you one play makes a difference in the game. I should have caught that ball. Tipped off my glove and they scored a couple of runs there. There’s no excuses for that. That ball should have been caught.”

Garcia had not pitched more than 6 1/3 innings with the Braves before working eight on an afternoon that turned steamy after sun followed heavy morning showers.

Daniel Murphy’s leadoff homer in the second inning was only the second allowed by Garcia in his past five starts. After the two errors to start the third inning, the Nationals drove in both runners on singles from Harper, who had a relatively quiet series, and Murphy.

The Nationals snapped a season-high, four-game losing streak and won for the 19th time in 25 games against the Braves since the beginning of the 2016 season. The Braves are 2-4 against them this season, all in Atlanta.

Strasburg was 3-7 with a 4.61 ERA in his first 16 starts against the Braves, but he’s 7-1 with a 2.33 ERA in his past nine while piling up 63 strikeouts with 12 walks in 53 innings over that span. The Braves scored two runs or fewer in seven of those nine games, and Strasburg has been particularly dominant in games in Atlanta during that period.

“I don’t know if he missed a spot all day until the end,” Braves manager Brian Snitker said. “I told (hitting coach Kevin Seitzer), we could have had Hank (Aaron) and Murph (Dale Murphy) and some of them guys in the lineup, I don’t think it would have mattered, because he was really good.”

In Strasburgh’s five-start winning streak in Atlanta — three at Turner Field, two at SunTrust Park — he has a 1.34 ERA, 39 strikeouts, seven walks and no home runs allowed in 33 2/3 innings. He pitched six or seven innings in the first four of those starts before pitching into the eighth inning Sunday and maintaining his upper-90 mph velocity.

The first eight Braves were retired before Garcia’s two-out double in the third inning off Strasburg. “He’s got unbelievable stuff,” Garcia said. “I was able to get a good ball to hit and got that double, but he’s one of the best.”

Strasburg has two double-digit strikeout games this season, both against the Braves at SunTrust Park.