The Orioles trailed 6-2 after seven innings but rallied for five runs in the final innings.
Erik Bedard allowed six runs on five hits with five strikeouts and four walks over 5 2/3 innings for Baltimore. Rob Bell (1-1) pitched a perfect eighth for the win.
Chris Ray struck out three straight swinging in the bottom half for his 14th save of the season.
Pregnant Mila Kunis wins 'Best Villain' at MTV Movie Awards
'Happy' fan videos make Pharrell cry [VIDEO]