Posted with permission from The Sports Xchange

Baltimore Orioles starting pitcher Dylan Bundy (37) throws a pitch against the Oakland Athletics in the second inning at Oriole Park at Camden Yards on Wednesday. Patrick McDermott-USA TODAY Sports

BALTIMORE -- Zach Britton's American League record streak of consecutive saves ended at 60, but the Orioles still managed to emerge with an 8-7 victory over the Oakland Athletics on a game-winning homer by Manny Machado in the 12th inning Wednesday.

Baltimore won for just the third time in eight games, which has caused it to slip down the wild card standings.

Oakland shortstop Marcus Semien was back in the starting lineup after getting previous night off because of right wrist discomfort and went 3 for 5 with an RBI double in the sixth and a single in the ninth that cut Baltimore's lead to 7-6 off Britton. One batter later, Matt Joyce tied the game on a sacrifice fly.

Britton was lifted after walking Khris Davis and he walked slowly to the dugout to a standing ovation. He had not blown a save since Sept. 20, 2015.

Machado provided the victory when he led off the 12th with a shot that barely cleared the center field wall off Simon Castro (1-2). Baltimore's Miguel Castro (3-1) picked up the win by throwing 3 2/3 scoreless innings,

Welington Castillo, Trey Mancini, and Chris Davis also homered for the Orioles.

Baltimore's Dylan Bundy, who started on 10 days' rest, was charged with three runs and seven hits with eight strikeouts and no walks over six-plus innings. He is pitching his second full season since undergoing Tommy John surgery in 2013 and the Orioles are trying to limit him to about 180 innings.

Tim Beckham went 3 for 6 for the Orioles and is batting .421 since being acquired from Tampa Bay at the non-waiver trade deadline.

Castillo had a two-run shot in the sixth off reliever Daniel Coulombe that gave the Orioles a commanding 6-1 lead. An RBI single by Matt Olson pulled the A's to within 6-2 in the seventh that ended Bundy's day.

Oakland managed another run that inning on an RBI single by Maxwell off Mychal Givens. The Athletics chipped away and a two-run homer by Joyce in the eighth cut the margin to 6-5.

Davis provided a cushion with his 20th home, but this time, it was enough for Britton.

The A's recalled Daniel Gossett from Triple-A Nashville to replace scheduled starter Sean Manaea, who is getting extra rest. Gossett, who was making his first appearance for the A's since Aug. 2, allowed five runs and eight hits with six strikeouts over five-plus innings.

NOTES: Athletics RHP Kendall Graveman (3-4, 4.54 ERA) will start Friday against Texas. ... Orioles RHP Miguel Castro was reinstated from the bereavement list Wednesday. To make room, the Orioles optioned RHP Alec Asher to Triple-A Norfolk on Tuesday. ... Oakland RHP Paul Blackburn could make his next start after taking a line drive off the side of his right hand Tuesday, manager Bob Melvin said.