BALTIMORE — Chris Davis hit his major league-leading 23rd home run, Nick Markakis had four hits and scored three runs, and the Baltimore Orioles beat Jon Lester and the Boston Red Sox 6-3 Sunday.

Manny Machado extended his hitting streak to a career-high 14 games and drove in a run for the Orioles, who took three of four from first-place Boston to move within 1½ games of the AL East lead. Baltimore has won six straight series over the Red Sox, dating to last year.

Davis homered on a 3-1 pitch from Lester with a runner on to give the Orioles a 3-0 lead in the third inning. It was his 100th career homer and seventh in the last 10 games against Boston. Davis also doubled in a run in the fifth to give him 60 RBIs.

Will Middlebrooks hit a three-run homer for the Red Sox, who are 2-5 against the Orioles this season and 5-14 in the last 19 games between the teams.

Baltimore starter Miguel Gonzalez (5-2) took a two-hitter and a 5-0 lead into the seventh. He ended up allowing three runs and five hits in 6 1-3 innings to improve to 3-0 lifetime against Boston.

Jim Johnson worked the ninth for his 25th save, the second in the series.

Lester (6-4) fell to 14-2 lifetime against the Orioles, 7-1 at Camden Yards. The right-hander gave up five runs and nine hits in five innings, striking out eight.

Baltimore took control with a three-run third. After Adam Jones doubled in a run, Davis stepped to plate 0 for 14 in his career against Lester. That changed with one mighty swing of the bat, the result a drive far over the right-field wall.

In the fifth, Markakis doubled and scored on a single by Machado before Davis hit a two-out RBI double for a 5-0 lead.

Middlebrooks made it interesting with his ninth home run, closing the gap to 5-3 in the seventh. In the bottom half, however, Markakis doubled and scored on a single by J.J. Hardy.

NOTES: Boston's Mike Carp left in the seventh inning with tightness in his right hamstring. ... A crowd of 41,311 pushed the Orioles over the 1 million mark after 35 home dates. ... Machado hit his major league-leading 32nd double, his fifth in five games. ... Boston's Jose Iglesias singled in the eighth to stretch his hitting streak to 17 games. ... Actor Richard Gere threw out the ceremonial first pitch. He was wearing an Orioles jersey with the word "DAD" on the back. ... Red Sox RHP Pedro Beato pitched the sixth after being recalled from Triple-A Pawtucket earlier in the day. ... Manager John Farrell says RHP Clay Buchholz (neck) could go on the DL if he can't throw his bullpen session on Tuesday. Buchholz (9-0, 1.71 ERA) hasn't pitched since June 8. ... Farrell says Alfredo Aceves will be recalled from Pawtucket to start in Tuesday's doubleheader against Tampa Bay. ... The Orioles are uncertain if Jason Hammel will start against Detroit on Monday. Manager Buck Showalter said the right-hander was feeling better Sunday following an illness, but there's a contingency plan. "We've got two or three different ways to go," Showalter said. ... Lester has yielded six homers in his last three starts after giving up five in his first 12 starts.