ST. PETERSBURG, Fla. -- Pinch hitter Jerry Sands hit a two-run homer in the bottom of the eighth inning to lift the Tampa Bay Rays to a 5-4 victory over the Baltimore Orioles on Monday night.

It was Sands' first home run since September 20, 2011, when he was with the Los Angeles Dodgers.

The Orioles tied the game at 3-3 in the top of the eighth inning when designated hitter Nelson Cruz reached on an infield single with the bases loaded, scoring right fielder Nick Markakis with one out. Rays reliever Jake McGee recovered to strike out shortstop J.J. Hardy and retire pinch hitter Steve Pearce on a grounder to end the inning.

Sands hit his homer off Darren O'Day, who had walked third baseman Evan Longoria earlier in the inning. That blast gave the Rays a 5-3 lead.

The Orioles pulled within one in the top of the ninth when pinch hitter Delmon Young hit a solo homer off of right-hander Juan Carlos Oviedo with one out. However, Oviedo recovered to retire Markakis and third baseman Manny Machado to record his first save of the season.

Rays starter Jake Odorizzi was cruising through the first five innings, yielding just one hit and enjoying a 3-0 lead when things turned sour quickly. He gave up a leadoff double to Markakis and a two-run homer to Adam Jones with one out in the sixth. That ended his night on the mound.

Orioles starter Wei-Yin Chen gave up three runs and six hits over 6 2/3 innings in the no decision.

The Rays got on the scoreboard early when shortstop Yunel Escobar hit a home run well over the 370-foot sign in left center in the first inning.

The long ball served the Rays well again in the bottom of the fourth when catcher Ryan Hanigan hit a two-run blast down the left-field line that scored designated James Loney and extended the lead to 3-0.

Meanwhile, Odorizzi was having one of his best outings of the season. He found a little trouble in the top of the second after giving up an infield hit to Hardy and walking left fielder David Lough following an 11-pitch battle, but a strikeout of second baseman Ryan Flaherty ended the inning.

NOTES: Orioles RHP Miguel Gonzalez is expected to be activated from the 15-day disabled list and start Tuesday's game. He is 3-3 with a 3.55 ERA in nine career starts against the Rays. ...Tropicana Field replaced a patch of padding in left-center field with fencing so fans can watch the game from the field level view. Rays 3B Evan Longoria hit a first-inning double into the fenced area.