BALTIMORE -- Dylan Bundy had eight strikeouts in six solid innings, and the Baltimore Orioles ended the Oakland Athletics' six-game winning streak with a 5-3 victory Thursday night.
Stephen Piscotty homered for the A's, who fell 3 1/2 games behind first-place Houston in the AL West and 1 1/2 back of the Yankees for the top wild-card slot.
Oakland activated lefty Brett Anderson from the 10-day disabled list to make his 14th start of the season. In his return from a forearm injury, Anderson (3-5) allowed four runs and didn't make it out of the fourth inning.
Bundy (8-14) gave up two runs and six hits to earn his first win since July 29. The right-hander was 0-5 in his previous seven starts.
Though he yielded his major league-high 38th home run, Bundy was good enough to help Baltimore snap a six-game skid and avoid being swept for the 22nd time.
Down 4-2 in the eighth, Oakland loaded the bases with one out. After Paul Fry walked Matt Olson to force in a run, Mychal Givens struck out Piscotty and retired Marcus Semien on a fly ball.
Jace Peterson doubled in a run in the bottom half, and Givens worked the ninth for his seventh save.
Baltimore took its first lead of the three-game series when Tim Beckham hit a two-run single in the first inning.
Piscotty made it 2-1 in the second with his 24th home run, extending Bundy's streak of allowing a long ball to 12 games.
The Orioles got RBI singles from John Andreoli and Breyvic Valera in the fourth, and Oakland answered with a run-scoring single by Nick Martini in the fifth.