Machado's blast capped a six-run fourth inning and is his third grand slam of the season. Chris Davis, who exited in the fifth with an undisclosed injury, also homered in the second inning. Adam Jones drove in three runs, one on an eighth-inning solo shot.
Rays starter Jake Odorizzi, who was 4-0 in August, had an outing to forget. The right-hander lasted four innings and allowed seven runs on six hits and three walks. Orioles starter Yovani Gallardo ended a five-start winless run, allowing two runs, one earned over five innings, with Rays second baseman Logan Forsythe going deep for a leadoff homer in the first.