BALTIMORE -- Chris Davis had two hits and collected his 118th RBI, and the Baltimore Orioles hit three home runs in a 10-3 rout of the Oakland Athletics on Sunday.
J.J. Hardy, Nick Markakis and Nate McLouth connected for the Orioles, who took two of three from Oakland to move within two games of the Athletics in the race for the second AL wild-card slot.
Oakland had gone 105 straight games since April 25 without allowing 10 runs. Rookie Sonny Gray (1-2) absorbed the brunt of the damage, yielding six runs and eight hits in 3 1-3 innings.
Scott Feldman (4-3) gave up one run in five innings for the Orioles.
In his first three major league starts, Gray allowed a total of four earned runs and 10 hits over 21 innings. In this one, he didn't make it out of the fourth inning.
The 2011 first-round draft pick was vying to become the first major leaguer since Wayne Simpson in 1970 to begin his career with four consecutive starts of six innings while permitting four hits or fewer. That pursuit ended in the second, when the right-hander gave up three hits and fell behind 5-1.
Josh Donaldson homered for the Athletics, who have lost four of five.
Baltimore got contributions from almost everyone in the lineup. Hardy had three hits, including his 23rd home run. Manny Machado hit two sacrifice flies and Markakis snapped a lengthy power shortage with a double and his ninth home run.
Although Davis did not add to his major league-leading home run total of 46, he raised his batting average to .304. His 118 RBIs are 33 more than his previous career high.
Feldman wasn't exceptionally sharp, but he made the right pitches when it counted. The right-hander gave up three hits, walked four, hit a batter, committed a balk and needed 102 pitches to get 15 outs.
Ten of Feldman's first 12 pitches were out of the strike zone. He walked two in the first inning and yielded an RBI single to Alberto Callaspo.
Baltimore answered with two runs in the bottom half. Successive singles by Machado, Davis and Adam Jones produced a run, and Matt Wieters followed with a sacrifice fly.
The Orioles made it 5-1 in the second. Roberts hit an RBI single, Machado delivered a run-scoring flyout and Davis foiled a shift to the right side by lining an RBI single through the infield and into left field.
A walk, a double by McLouth and another sacrifice fly by Machado made it 6-1 in the fourth and ended Gray's afternoon. His ERA jumped from 1.44 to 3.18.
Hardy hit a solo shot in the sixth and Donaldson connected with a man on in the eighth.
Markakis and McLouth homered in the bottom of the eighth. Markakis' third-inning double ended a run of 126 at-bats without an extra-base hit.
NOTES: Oakland RF Josh Reddick left with an injured right wrist. ... The Athletics head to Detroit, where they start a four-game series Monday night against the AL Central leaders. Baltimore gets Monday off before opening an important three-game set against AL East-leading Boston at Fenway Park. ... Manager Bob Melvin left Oakland OF Yoenis Cespedes out of Sunday's starting lineup to give the struggling slugger an "off day mentally just as much as physically." Cespedes was 0 for 9 in the first two games of the series. . Athletics C Kurt Suzuki caught his second straight game. He went 0 for 4. ... Orioles RHP Jason Hammel (flexor strain) threw around 60 pitches on the side Sunday and will begin his rehabilitation assignment Thursday with Triple-A Bowie. ... Baltimore finished 21-12 against AL West, including 5-2 against Oakland.