WASHINGTON -- The visiting team began the night by scoring four runs in the first inning.
The home team ended the evening by scoring five times in the last of the ninth, but the visiting Baltimore Orioles had enough of a cushion to hold on for a 10-8 victory over the Washington Nationals in a wild finish Wednesday in the nation's capital.
The Orioles took a 5-1 lead off Washington starter Tanner Roark after two innings and got four hits and four RBIs from Manny Machado and two hits and four RBIs from Matt Wieters to beat the Nationals for the fourth time in a row at Nationals Park over the last two seasons.
Roark had gone at least six innings in 12 of his previous 13 starts but struggled with his command from the onset Wednesday.
"I couldn't locate," said Roark, who hit three batters and gave up five runs (four earned) and three walks in five innings. "Obviously not by best outing."
The winning pitcher was Wade Miley (8-10), who posted his first win as a member of the Orioles.
"It is a good lineup," said Miley, who gave up two runs in five innings.
Machado drove in Hyun Soo Kim, who also had two hits, with a single and Jonathan Schoop had an RBI single in the eighth to give the Orioles a 7-3 lead. Wieters hit a three-run homer to straightaway center off Blake Treinen to make it 10-3.
That came after an RBI single by Murphy had trimmed the margin to 5-3 in the seventh for the Nationals, who had 15 hits.
Washington's Trea Turner began the night with four hits in as many at-bats to give him eight hits in a row. That ties a Nationals record from 2005 to present and also ties a Montreal/Washington franchise record as Andrew Dawson reached base in eight straight plate appearances in 1983. Turner struck out for the first out in the ninth.
"He is a good player. I have been watching him play other teams," Baltimore manager Buck Showalter said of Turner.
The Orioles (70-56) have won six games in a row over the Nationals (73-53) over the past two seasons, including three this week in two cities.
Washington has lost four in a row overall.
Miley (8-10) entered the game with a 5.58 ERA this season, split between Seattle and Baltimore.
The veteran lefty was replaced in the sixth by right-hander Mychal Givens, who retired three batters with two runners on base to escape the jam. Rookie lefty Donnie Hart fanned Bryce Harper to end the seventh with two runners on base.
The loser was Roark (13-7), who was defeated for the first time since July 22. He was replaced in the sixth by rookie Koda Glover, who threw two scoreless innings.
The Orioles jumped on Roark in the first.
Machado crushed a two-run homer to left to make it 2-0. A double, a walk and two hit batters produced another run. J.J. Hardy followed with a sacrifice fly to give the Orioles a 4-0 edge.
The Nationals got one run back in the bottom of the first, when Rendon had an RBI double to score Turner.
Baltimore responded in the second. Machado had an RBI single to score Jones, who reached on an infield single and took second on a throwing error by third baseman Rendon.
Danny Espinosa hit his second homer in two games, a solo shot in the fifth, to trim the margin to 5-2. It was the 20th homer of the season for Espinosa, who hit a career-high 21 homers in 2011.
Roark had his shortest start since June 5, when he went three innings at Cincinnati.
"I am proud of the guys. We came back," Roark said.
NOTES: The Orioles put RHP Chris Tillman (15-5, 3.76 ERA) on the 15-day disabled list with right shoulder bursitis. He was slated to start here Thursday against Washington, but RHP Ubaldo Jimenez (5-10, 6.94) will get the nod against Nationals RHP Max Scherzer (13-7, 3.05). ... Baltimore called up RHP Mike Wright (3-4, 5.97 ERA with the Orioles) from Triple-A Norfolk.