BALTIMORE -- A torrid Orioles offense that entered the day leading the American League in runs scored, hits, doubles, home runs, slugging and extra-base hits went missing for most of Thursday night.

Enter Freddy Garcia.

The 36-year-old right-hander, who signed a Minor League contract after he was released by San Diego this spring, turned in a phenomenal -- and all too uncommon -- effort, firing a season-high eight scoreless innings and giving the bats a well-deserved break. The result, a 2-0 win over Washington, gave Baltimore three of four in the Battle of the Beltways, including both home games, as well as wins in five of their last seven games overall.

"I don't take it for granted," Garcia, who held a Nationals lineup missing Bryce Harper to just three singles, said of earning a turn in the rotation earlier this month. "Every five days I take the mound, I'm glad they gave me the opportunity to be here and pitch."

Garcia, who got Danny Espinosa to fly out on his season-high 113th pitch, exited to a rousing ovation from the crowd of 30,655 fans at Camden Yards, with chants of "Freddy" accompanying his final batter. The veteran righty, who became just the second Orioles starter to complete at least six innings in the past eight games, turned in his first start of eight or more scoreless frames since September 19, 2006, as a member of the Chicago White Sox.

"It was fun to watch," said Orioles manager Buck Showalter, noting that rookie pitcher Kevin Gausman had a pretty good seat for the show. "Freddy's margin for error isn't near what guys who have that pure stuff's margin for error is. ... But he knows himself. It's kind of like knowing who you are as a team and as an organization. Same way with Freddy."

Showalter admitted he became a spectator for a while and was tempted a few times to remove Garcia -- who last made it through eight innings in 2009 -- given how close the game was and the hot, sticky conditions at Camden Yards. But Showalter's intuition told him otherwise.

"I was so careful about changing the karma of the game," Showalter said. "There was just a vibe in that game that he fits into, I thought. I could have taken him out after a lot of things. I got to tell you, I considered running him out there in the ninth. He's not going to sweat any more than he already is. Man, he had a great lather going tonight. I think he changed shirts two or three times."

Garcia used the conditions to his advantage, striking out a season-high six batters -- he entered the game with a combined seven punchouts in his previous four starts -- and making good use of his splitter.

"He was throwing, [it was] basically like facing [knuckleballer] R.A. Dickey," Nationals shortstop Ian Desmond said. "Obviously R.A. Dickey won the Cy Young, so that's no knock against Freddy. But I think the humidity and the tackiness on the ball, his fingers, there's probably a little bit of sweat going on there, that pitch was pretty unbelievable."

Added Ryan Zimmerman: "[It was] a knuckle or something. I don't know. If a pitcher's got a good pitch and he throws it as much as he did, obviously you start to look for it. And we still can't hit it."

And the result was a dominant outing, a much-needed shot in the arm for an inconsistent O's rotation and an overworked bullpen.

"It was big," Orioles right fielder Nick Markakis, who doubled in a run, said of Garcia's effort. "You can't say enough about him. He was a bulldog out there. He gave us eight innings and then [closer] Jim Johnson [finished it]. That's how a baseball game is supposed to be played."

Garcia, making his sixth start since being promoted from Triple-A Norfolk, needed just 66 pitches to get through the first five frames and cruised for most of the night. The Nationals had a pair of singles to start the second, from Adam LaRoche and Desmond, but Garcia held firm and used an array of offspeed pitches to keep the Nats from capitalizing. Garcia went on to retire the next 14 consecutive batters before Roger Bernadina lined a ball off the visiting scoreboard for a two-out single in the sixth. But Garcia, helped by his defense all night, got Zimmerman to ground out to end the frame.

"In the past, he got behind a little bit," Orioles third baseman Manny Machado said of Garcia, who has won back-to-back starts. "Today, he had his 'A' game on, got ahead and pitched a very great game."

Garcia retired 20 of the final 21 batters he faced, with shortstop J.J. Hardy making a nice backhanded stab to retire Desmond for the second out in the seventh and Markakis' diving grab robbing Denard Span in the third. The three-hit effort was the Nationals' season-low and improved Garcia to 3-0 with a 1.59 ERA in three career starts against Washington.

"I had no idea how many I got [in a row]," Garcia said. "But you've got to be happy to do that. Get it going, pitch one pitch at a time and make [a] good pitch."

Nats starter Dan Haren -- who entered the game with a 5.43 ERA -- was nearly as good, lasting 7 1/3 quality innings despite being tagged with the loss. The Orioles got on the board in the third inning courtesy of Markakis' two-out double to score Ryan Flaherty, who had a leadoff single. Machado, who singled in the third, gave the O's a tack-on run with a one-out double in the eighth. The two-bagger, which extended Machado's Major League-lead to 25 doubles, scored Nate McLouth and chased Haren from the game.

"You guys weren't expecting a pitchers' duel tonight?" McLouth joked to reporters. "I was sitting out there thinking the same thing [after Wednesday's slugfest]. But both pitchers threw really, really well tonight. I don't think there was a walk in the game. That shows you, if you throw strikes, what can happen. They both pitched amazing."

Garcia's effort ensured the bullpen would largely get a night off, with Johnson putting the finishing touches on the win with a 1-2-3 ninth inning for his 17th save. The season-series-clinching win, which puts the O's on the upswing as they welcome a lethal Detroit team, improved them to 4-1-3 in the all-time series against Washington.

"I think it's great for our organization and our franchise, and more importantly, our fans," Showalter said of the favorable crowd-backing for his team over the past four games. "When you have that type of support, you want to do something that makes them want to come back and be a big part for us. What they did with Jimmy last night [in a warm reception] and again tonight, it's been a difference-maker for us. It's a two-sided coin, one doesn't happen without the other, and that's the way it should be."