Alex Wood was almost perfect against the last 23 Washington batters that the young Braves left-hander faced Sunday.

But almost wasn’t enough on a day when Braves bats were again quiet.

Ian Desmond hit a tie-breaking homer on Wood’s first pitch of the seventh inning, lifting the Nationals to a 2-1 win against the Braves in Sunday’s series finale at Nationals Park, avoiding a sweep and snapping Atlanta’s four-game winning streak.

“The worst pitch I threw all day, and he made me pay,” Wood said. “I knew right when it left my hand that it wasn’t going to be a very good outcome.”

It was the Nationals’ first win in eight April games between the division rivals over the past two seasons, and only the Braves’ seventh loss in the past 26 games against Washington. The Braves (4-2) and Nationals (4-2) will meet again next weekend in Atlanta.

Wood (1-1) gave up a run on three consecutive singles to start the first inning, including two that didn’t leave the infield — a bunt to start the inning and a grounder that Dan Uggla fielded in front of shortstop Andrelton Simmons near second base and couldn’t make a strong enough throw to get the runner at first.

Then he retired 18 of the next 19, with the only base runner in that span reaching on a throwing error by Chris Johnson.

Braves pitchers have allowed two runs or fewer in all six games this season and lead the majors with a 1.56 ERA. But Atlanta hitters again wasted chances, going 1-for-9 with runners in scoring position.

“We didn’t score enough runs for him,” said Simmons, who stranded five runners by twice grounding into force plays with two outs. “If we would have done a better job with runners in scoring position today, we would have had a better result.”

Wood threw 92 pitches in the first six innings and was sent back out for the seventh. His first pitch of the inning was an 87-mph inside fastball that Desmond pounced on, driving it to the left-field bleachers for a 2-1 lead.

“We tried to go hard in to start and left it up and over the plate,” said Wood, who retired the next three batters to finish with four hits, two runs and no walks allowed in seven innings, and four strikeouts. He threw 107 pitches, 75 for strikes.

“He pitched a heck of a game,” catcher Gerald Laird said. “Desmond’s a good hitter, and when you make mistakes he’s going to make you pay. We were looking to get in there (inside fastball) to kind of set up the whole at-bat, to go off-speed on the next pitches. It just kind of crept back over the plate, and you know the hitter that Desmond is.”

Braves pitchers came through with another exemplary performance, and the offense again provided no margin for error.

“We didn’t score runs when we had some opportunities,” said manager Fredi Gonzalez, whose Braves won both series on the trip to Milwaukee and Washington despite batting .221 and scoring two or fewer runs four times.

Jason Heyward was 0-for-5 with two strikeouts, including a strikeout to end the game with runners on first and second.

“Woody threw a great game,” Heyward said. “We didn’t come out on top but we had opportunities to win. We played well enough to win the game. That’s all you can ask.”

The Braves were 5-for-16 with runners in scoring position in a 6-2 win Saturday, but 2-for-22 in the other five games.

Following Desmond’s homer, the Braves had a chance to tie again in the bottom of the seventh after Simmons’ leadoff single. Wood’s sacrifice bunt moved the runner into scoring position, but Heyward struck out and B.J. Upton lined out to the shortstop to end the inning.

The Braves had one more chance in the ninth inning after consecutive two-out singles by Simmons and pinch-hitter Ryan Doumit against closer Rafael Soriano. That brought up Heyward, who ran the count full before striking out with a big cut that ended the game and left him 0-for-10 with four strikeouts in the last two games of the series.

Simmons stranded a handful of runners earlier, with 5-4 groundouts to end the second and fourth innings. The Braves had two runners on in the second, and had the bases loaded in the fourth before Laird struck out and Simmons grounded into a force at second.

The Braves started the sixth inning with a Freddie Freeman single and Chris Johnson double, and with two runners in scoring position Justin Upton struck out for the first out in the inning. He’s hitting .182 overall and is 1-for-8 with runners in scoring position.

Uggla followed with a long sacrifice fly to the left-center warning track to tie the score, before Laird flied out to end the inning.

Despite ending the series with a loss, Gonzalez and his players all said they were pleased with the overall trip and eager to get to Atlanta for some rest before a six-game homestand that starts with the Mets on Tuesday.

“A 4-2 road trip, and the two games that we lost were great-pitched ballgames,” Gonzalez said. “And so, day off tomorrow and go get ‘em Tuesday for the home opener.”

The Braves’ mantra is to win every series, and they won both series to start the season.

“A 4-2 road trip is a good one,” Heyward said, “especially against two teams like that that play really well at their (ballparks).”

Said Wood: “I think we had a great road trip. Everyone is looking forward to going back home for a week, I can tell you that. It was a tease being there for a day-and-a-half last week and I know everybody’s real excited to finally get back home.”