Tanner Roark picks up his seventh win of the season for the Nationals. (Katherine Frey/The Washington Post)

Forget for a moment all those losses to the Atlanta Braves since the start of the 2013 season, and the Washington Nationals’ past two games bring a small measure of delight. After being beaten down in every way for more than a year by their fiercest division rivals, including in the first two games of this weekend series, the Nationals salvaged their pride and secured a split of a four-game set against the Braves with Sunday’s 4-1 win. If anything, they may have finally discovered a formula and convinced themselves they can indeed beat the Braves.

“It’s a step in the right direction,” left fielder Ryan Zimmerman said. Added reliever Craig Stammen: “I think the odds were in our favor to finally win a game against them. Two in a row is definitely good.”

Behind a strong showing from Tanner Roark and the bullpen — and a few timely hits — the Nationals topped the Braves to split the series and move ahead by 11 / 2 games in the National League East, exactly where they were when the series at Nationals Park began on Thursday. Although the Nationals are still 9-20 against the Braves since 2013 and 3-7 this season, the past two games provided glimmers of hope after a rough first two games.

“It’s a huge swing,” Roark said.

In the four games, the Nationals played perhaps their cleanest baseball against the Braves this year.

“I’m proud of the guys for staying in there,” Nationals Manager Matt Williams said. “We’ve talked about it many times — you have to have a short memory. After the first two, we got two really good pitching performances, and the guys battled and hit some home runs and played good defense and executed. That’s what we’ll have to do to win games.”

Roark fired 51 / 3 stout innings, fighting through base runners and foul balls. Like he has all series, Stammen delivered in relief, stranding the two runners he inherited in the sixth inning and getting through the seventh on seven pitches. Tyler Clippard, who entered the series having been scored upon in eight of his previous nine outings against the Braves, fired a scoreless eighth inning. And Rafael Soriano, in his third straight day of work, notched his 17th save by making the three Braves hitters he faced look helpless.

“We had been struggling against them all year, and it’s not a secret,” Clippard said. “It’s good to get those two wins under our belt moving forward.”

Even though he wasn’t his sharpest, Roark was effective despite being slowed by a combination of close calls, a defensive miscue and the Braves’ ability to foul off his pitches. He relied heavily on his slider, a pitch that felt good in the bullpen before the game and he thought might fool an aggressive Braves lineup.

In Roark’s 26-pitch fourth inning, he worked around a two-base error by Adam LaRoche and a 3-2 curveball to Jason Heyward that caught the inside corner of the strike zone but was called a ball.

The same thing happened to Roark in the fifth. With two outs and a runner at first, he fired a 2-2 backdoor curveball to Tommy La Stella that appeared to catch the top outside edge of the strike zone. Instead, home plate umpire Mark Carlson called it a ball. Roark escaped the inning without any runs, but his pitch count climbed.

“You can never get mad at umpires,” Roark said. “You get frustrated with yourself. For me, they’re going to call balls and strikes, and I’ll just worry about pitching.”

In the sixth inning, Roark encountered one jam he couldn’t escape. Freddie Freeman singled to lead off, and Roark walked Evan Gattis on five pitches. Roark got Heyward to fly out to right but then allowed an RBI single to Justin Upton, trimming the deficit to 3-1. Williams took Roark out of the game, and the right-hander walked off the mound shaking his head. He wanted to clean up his mess, but Stammen did that for him.

Stammen struck out Chris Johnson, who was called out by first base umpire Tim Welke on an appealed check swing. Then the Braves’ frustration with the umpiring boiled over, with Johnson erupting on his way to an ejection, pointing his bat at Welke from home plate and yelling. Stammen then got Andrelton Simmons to ground out to end the threat. The Nationals dealt with the same umpiring but mostly kept their cool.

“We were getting frustrated not being able to play our best baseball against them,” Stammen said. “But I think they showed a little frustration toward the end of the game. This race is going to go down to the very end. We gotta play them tough as many times as we can.”

The Braves’ feelings showed in a few more instances. Anthony Rendon went 5 for 16 in the series, and in his first at-bat starter Ervin Santana buzzed a first-pitch, 95-mph fastball near his head. Rendon drew a walk , a mistake Santana and the Braves may regret.

Jayson Werth then smacked a single to center. The next batter, LaRoche, drilled an RBI single up the middle. Zimmerman lifted a ball to deep center for a sacrifice fly to push the lead to 2-0.

Span brought home the next run in the fifth inning with an RBI double. Rendon made it 4-1 in the eighth inning when he scored on a wild pitch by Luis Avilan.

When Soriano took the mound in the ninth inning, the Nationals were in control, and the Braves’ frustration with the strike zone boiled over again. Justin Upton was tossed after striking out swinging on a wicked Soriano slider. Soriano struck out the next two batters and forcefully untucked his jersey. “They didn’t have a chance,” Stammen said of the Braves’ hitters.

Teammates streamed out of the dugout to celebrate. Maybe, finally, the Nationals found a way to beat the Braves. These two wins against them, at least, have instilled self-confidence in the Nationals for the next time they face the Braves in early August.

“To come out after losing the first two and being able to split the series and be able to maintain the [division] lead, even though it’s early, is a good feeling,” second baseman Danny Espinosa said.