Mike Carp hit a two-run home run and Jonny Gomes added a solo shot, as Boston held on late to down Baltimore, 5-4, in the third edition of a four-game series from Camden Yards.
Dustin Pedroia and Stephen Drew knocked in a run each for the Red Sox, who put the brakes on a two-game skid.
"We feel like we're going to mash every day," Carp said. "It just takes one guy to get going, fortunately today it was me. Tomorrow it's going to be another guy and so on and so forth."
John Lackey (4-5) allowed a pair of first-inning runs on seven hits with four strikeouts over seven innings. Andrew Bailey allowed a two-run homer to Matt Wieters in the ninth, but managed to pick up his eighth save thanks to some errant baserunning by Baltimore with the game on the line.
Adam Jones and Manny Machado recorded RBI for the Orioles, who lost for just the second time in their last seven.
Freddy Garcia (3-4) was pulled after 5 1/3 innings, charged with eight hits and five runs in defeat.
Bailey got into trouble immediately, giving up a leadoff single to Jones then serving up a line-drive blast to right from Wieters two batters later to pull the hosts within 5-4. J.J. Hardy ripped a single and was replaced by pinch- runner Alexi Casilla, but Casilla took off from first on Ryan Flaherty's fly to right and was doubled off easily to end the contest.
"Flaherty hit that ball very good. He crushed it over my head. I kind of started running and looked where Victorino was playing and thought no chance he was going to catch that ball," Casilla said in his defense. "I guess I kept running. Just a bad read."
The O's got on the board in the first thanks to an RBI double from Machado to score McLouth and Jones' infield hit that plated Machado.
The Sox moved ahead for good in the fourth. Pedroia singled and Carp launched a two-run shot with one out. Gomes then singled and came around when Drew followed with a double to right.
Jacoby Ellsbury singled to start the fifth, stole second, was sacrificed to third by Shane Victorino and scored on a Pedroia groundout.
Lackey stranded a runner on third with one out in the home half, and Gomes increased the Boston edge to 5-2 with his shot to dead center with one out in the sixth.
The Orioles went quietly in the bottom of the sixth, and though Lackey gave up a leadoff hit to Hardy in the seventh, he was erased when Carp snagged Flaherty's liner and stepped on the first-base bag. Taylor Teagarden then grounded to short to end the frame.
Koji Uehara turned in a scoreless eighth for Boston.