Updated

Chris Davis' RBI double in the fifth inning proved to be the difference, as the Baltimore Orioles beat the Boston Red Sox, 3-2, to avoid a three-game sweep.

Manny Machado knocked in two runs for the Orioles, who moved within 6 1/2 games of the Red Sox for first place in the AL East. Baltimore is 3 1/2 contests behind Oakland for the second wild card spot.

Baltimore starter Chris Tillman (15-4) allowed two runs on six hits while striking out eight over seven innings. The right-hander improved to 8-1 on the road this season. He's the first 15-game winner for the Orioles since Erik Bedard in 2006.

"My curve was there, it was there when I needed it. It got away from me in a couple of at-bats, but it was there when I needed it which was important," said Tillman.

Shane Victorino hit a solo homer for Boston, which had won four in a row. Stephen Drew had an RBI.

Jon Lester (12-8) got the start for the Red Sox and gave up three runs on five hits while walking three over six innings. The left-hander fell to 15-3 lifetime against the Orioles.

"I thought he had good stuff. A few times he kept it over the plate, but he was strong," said Red Sox manager John Farrell.

Boston jumped out to a 1-0 lead in the second inning. Daniel Nava doubled to left and raced home on Drew's two-out single to right.

The Orioles responded with two runs in the third. Brian Roberts reached base on a fielder's choice and Nate McLouth walked. Machado followed with a two-run double to left-center field. Baltimore, however, left men on first and second due to Victorino's running catch in right-center field to end the inning.

The visitors tacked on another run in the fifth. Adam Jones worked a two-out walk and crossed the plate on Davis' double off the Green Monster, making it 3-1.

Victorino's homer in the sixth made it a one-run contest.

The Red Sox had a chance to tie the game in the eighth. Jacoby Ellsbury singled, stole second and advanced to third when Dustin Pedroia flied out. Brian Matusz came in from the bullpen and got David Ortiz to go down swinging.

Jim Johnson tossed the ninth to pick up his AL-leading 41st save of the season.

Game Notes

Baltimore leads the season series by a 7-6 margin ... Tillman improved to 4-1 lifetime against the Red Sox ... Lester fell to 4-1 at home this season ... Boston went 1-for-10 with runners in scoring position and stranded five, while the Orioles went 3-for-12 with RISP and left 10 men on.