BALTIMORE — Adam Jones hit the first of Baltimore’s three home runs off Wade Miley, and the Orioles beat the Boston Red Sox 6-5 Thursday night for their first sweep of the season.

Nolan Reimold and Manny Machado also homered for the Orioles, who squeezed out a pair of one-run victories during the three-game series. Baltimore has won a season-high four in a row and six of seven.

Miley (5-6) allowed five runs and nine hits over four innings. After finishing the fourth, the left-hander engaged in a heated exchange with manager John Farrell in the dugout. Still screaming, Miley walked into the tunnel with Farrell in pursuit.

David Ortiz hit his seventh home run and Pablo Sandoval had two RBIs for Boston. The defeat left the Red Sox seven games under .500 (27-34), matching their low point of the season.

Chris Tillman (4-7) gave up four runs in 5 2-3 innings to improve his career record against Boston to 9-3.

After Chaz Roe yielded a solo shot to Ortiz in the eighth that made it 6-5, Zach Britton worked the ninth for his 17th save.

Baltimore was celebrating the victory when a replay overturned the apparent third out on a close play at first base. Undaunted, Britton struck out Dustin Pedroia to end it.

The Orioles executed several defensive gems on Wednesday night and continued the trend in the first inning of this one. Reimold chased down a liner to make a running catch near the left-field wall, and Machado snared a sharp grounder to third before making the throw from the outfield grass.

Jones hit his 10th home run in the bottom half, and Steve Pearce added an RBI single in the Baltimore second.

Reimold led off the third with his first homer since last August. Jones followed with a double and Delmon Young singled past the drawn-up infield for a 4-0 lead.

Tillman retired the first nine Boston batters before the Red Sox loaded the bases with no outs in the fourth. After Mike Napoli delivered a sacrifice fly, Sandoval doubled in two runs.

Machado connected in the bottom half to make it 5-3.

Sandoval chased Tillman in the sixth with an RBI single, and Baltimore restored its two-run cushion with an unearned run in the seventh.

Although the eighth-inning drive by Ortiz went for naught, it ended his run of 69 at-bats without a home run.