OAKLAND -- The Baltimore Orioles needed something different Sunday if they were ever going to figure out how to win in the Oakland Coliseum.
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 meetings dating back to 2008.
Catcher Matt Wieters led the Orioles' 9-5 victory by hitting two 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. Baltimore also remained one game behind the New York Yankees in the AL East.
"Every game is a must win, but it's a tough place to play, so we'll take one and go on to Seattle and try to win a couple up there," Wieters said. "It doesn't matter what happened yesterday or recently. We were ready to play today and get a win."
The A's slipped three games behind victorious Texas in the AL West race.
"Games like today are going to happen, but we took two of three from them," A's catcher George Kottaras said. "I keep saying it, but this team is young, and if we keep doing what we're doing, we'll be OK."
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.
"Scoring in six innings today was what kept the pressure on them," Baltimore manager Bucky Showalter said.
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 for his 29th homer. Reddick came in having gone just 8-for-55 (.145) with three RBI 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's starter and loser Dan Straily (2-1) had retired the first four Orioles he faced. He never returned to his early-game form.
"I just made a lot of mistakes plain and simple, I just didn't get the job done today," Straily said.
The visitors continued to chip away one run at a time. J.J. Hardy's smash to third ricocheted off Oakland third baseman 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 Straily to break the 2-2 tie. And Straily lost command 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.
"That's the most guys I've ever walked in a single game in my life," Straily said. "That's frustrating."
The Athletics' season-long struggles with the strikeout continued. 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 to open the fifth
"Typical of a veteran pitcher, he bent but didn't break," Showalter said. "He didn't panic, he kept us in the game through four. We knew we had some bullets down there, and we used them."
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.
"You win the first two games and you want to get greedy and take the third game," A's manager Bob Melvin said. "We're going day to day, but going into this series, if you have a chance to take two out of three to a good team like that, we'll take it."
NOTES: A's center fielder Coco Crisp missed Sunday's game due to a bout with conjunctivitis. 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. ... 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 (2-11).