OAKLAND -- The Orioles needed something different on Sunday if they were ever going to figure out how to win in Oakland.
It turns out all they needed was to play in daylight.
Baltimore continued its mastery of day baseball, winning for an American League-leading 28th time in 42 chances, to stave off a three-game sweep at the hand of the A's, who as hosts had beaten the Birds 16 of their previous 18 games dating back to 2008.
Catcher Matt Wieters led the Orioles' 9-5 victory by hitting a pair of home runs and reaching base four times in all. Oakland's pitchers were more than generous in allowing nine walks. The Orioles moved to within two games of the A's lead in the wild card standings with their 27th win in 40 games.
The Orioles broke it open in the seventh with a three-run rally. Wieters and Mark Reynolds drew walks to open the frame before rookie third baseman Manny Machado doubled to left-center to plate the first run. Endy Chavez's single to center against a drawn-in infield scored two more against Tyson Ross, Oakland's fifth pitcher in three innings. Chavez went 4-for-4 with a walk and scored twice.
The long ball accounted for most of the scoring early.
A's right fielder Josh Reddick found his stroke again to belt a 2-0 pitch into the right field seats with a runner on in the first inning. Reddick's 29th homer came after having gone just 8-for-55 (.145) with three RBIs over 14 games. Collin Cowgill led off the game with a double two batters earlier.
Wieters cut the early deficit in half with the first of his two homers, a deep drive to right on a 2-2 count with one out in the second inning. A's starter and loser Dan Straily (2-1) had retired the first four Orioles he faced.
The visitors continued to chip away one run at a time. J.J. Hardy's smash to third ricocheted off of Josh Donaldson and into foul territory to allow Chavez to score with two outs in the third. Hardy was awarded an infield single.
Wieters launched the first pitch of the fourth again into the right field seats off of Straily to break the 2-2 tie. And Straily lost command an inning later when his third walk of the fifth inning forced in Baltimore's fourth run. Known for his outstanding strikeout-to-walk ratio, Straily was removed after walking five and fanning just one.
The A's season-long struggles with the strikeout continued on Sunday. When Stephen Drew went down swinging to lead off the sixth against Orioles reliever Brian Matusz (6-10), it marked a franchise record for A's batters striking out. Their 1,231 strikeouts top the previous team record of 1,226 set in 2008.
Left-hander Randy Wolf made his first start for the Orioles after working in relief during his first three outings with Baltimore. After surrendering the two-run bomb to Reddick in the first, Wolf settled down to hold Oakland scoreless until the bullpen was called upon as early as the fifth inning.
Relievers Tommy Hunter, Matusz and Darren O'Day combined to limit Oakland to three baserunners until Drew blasted a two-run homer with two outs in the eighth as Oakland lost for only the second time in 10 games.
Baltimore added two in the ninth on run-scoring hits from Robert Andino and Chris Davis. Reddick produced an RBI single in the bottom half of the frame.
Orioles closer Jim Johnson earned his 43rd save.
NOTES -- A's outfielder Coco Crisp missed Sunday's game due to a bout with congunctivitis. Manager Bob Melvin said Crisp has been dealing with the eye problem "for the last couple of days." Crisp is batting .233 over his last 21 games. Melvin hopes Crisp will be available for Tuesday's game in Detroit, the first of 10 away games to cap Oakland's regular-season road schedule. ... Baltimore has lost 16 of 18 games in Oakland since 2008. ... Oakland's streak of starting pitchers allowing three or fewer walks was snapped at 44 straight games after Straily permitted five in 4 2/3 innings. It was the team's longest such streak since 1921. ... The Orioles open a three-game series in Seattle on Monday when Chris Tillman (7-2) will oppose the Mariners' Hector Noesi.