A tense interleague series between two neighboring teams with exceptional pitching staffs was decided by a timely swing from a player who almost got the day off.

Matt Wieters hit a two-run homer in the eighth inning to interrupt Baltimore's agonizing offensive struggle, and the Orioles squeezed past the Washington Nationals 2-1 Sunday.

Baltimore appeared headed for its third shutout loss in six games before Adam Jones led off the eighth with a single off Sean Burnett (0-1) and Wieters drove an 0-1 pitch over the center-field wall.

"It felt great," Wieters said. "Everyone was battling up there, trying to grind through at-bats to get a run, and to finally get one was great."

After Wieters gave Baltimore the lead, he sealed the victory in the ninth. With one out, Jim Johnson struck out Danny Espinosa and Wieters threw out Ian Desmond attempting to steal second base.

"Any out you can get, especially the 27th out, is huge," Wieters said.

Orioles manager Buck Showalter considered resting his workhorse catcher, who also played Saturday night, then decided against it.

"I came close to not playing Matt, with an off-day (Monday)," Showalter said.

Prior to the home run, the Orioles wasted several scoring opportunities and stranded eight runners over seven innings. Baltimore scored only five runs in the series and went 1 for 16 with runners in scoring position, yet still managed to win two of three.

"You win games with pitching," Wieters said. "And then it takes one big swing, or a couple of guys to get on and find some holes, and then you're right back in the lead."

The way the Orioles were hitting, it seemed unlikely they would mount a sustained attack against the Nationals. Fortunately, Wieters gave Baltimore everything it needed for another interleague victory.

"Clutch," teammate J.J, Hardy said. "I mean, to win a ballgame like that the way we've been swinging was something we needed. It just didn't seem like we were going to piece together a bunch of hits."

The Orioles finished 11-7 in interleague play and won five of six series.

Pedro Strop (4-2) got the final out in the eighth for Baltimore and Johnson worked the ninth for his 22nd save.

Ryan Zimmerman had the lone RBI for the Nationals, who scored five runs in the series. Washington was 34-2 when leading after seven innings.

The Nationals looked every bit like the team with the best ERA in the majors — except for that one pitch to Wieters.

"He just got a fastball over the heart of the plate," Washington manager Davey Johnson said.

"I tried to go with my strength and left the ball out over the plate," Burnett said. "He's a good hitter and made me pay for it."

Wieters' hit turned the series in Baltimore's favor. The Orioles won the opener 2-1, then lost 3-1 before taking the finale.

"We play a lot of close games, and our bullpen expects to get the job done in those situations," Burnett said. "Today I let one slip away."

Making his first start for the Nationals since May 25, Ross Detwiler allowed four hits and walked two in five innings. In his previous start against Baltimore on May 19, the left-hander gave up six runs. But that was at a point in the season when the Orioles scored 32 runs over a six-game span.

Jake Arrieta gave up one run and five hits in six innings, and it still took an unlikely comeback by the Orioles for him to avoid becoming the first 10-game loser in the big leagues this season.

Zimmerman snapped a 5-for-49 slump and gave Washington a 1-0 third-inning lead with a two-out single that scored Jhonatan Solano. Zimmerman, who had a cortisone shot in his ailing right shoulder before the game, went 2 for 4.

Detwiler retired his first seven batters and was cruising until the fourth, when Baltimore loaded the bases with two outs. Ronny Paulino hit a harmless fly ball to end the threat.

In the Orioles fifth, two singles and a groundout put runners on second and third with two outs for Jones, who hit a fly ball to deep left.

Bryce Harper led off the Washington sixth by turning a bouncer up the middle into a dash-for-second double, but Arrieta worked out of trouble by getting Desmond to hit a two-out popup.

Baltimore's frustration continued in the seventh, when Hardy grounded out with runners on second and third and two outs.

NOTES: On Monday night in Colorado, Washington RHP Stephen Strasburg vies to become the first player in Nationals history to win seven consecutive starts. ... The Orioles open a two-game series against the Los Angeles Angels on Tuesday. LHP Dana Eveland likely will begin paternity leave on that day, and it's possible that RHP Matt Lindstrom (finger) will be activated from the disabled list to fill out the Baltimore roster. ... Nationals closer Drew Storen, who had elbow surgery in April, hopes to make his season debut next weekend in Atlanta. ... Held out of the starting lineup in part because of an 0-for-28 slump, Baltimore's Chris Davis flied out as a pinch hitter. ... The Orioles have gone 17 straight games without a stolen base, their longest such streak since a 20-game run in June 1962.