BALTIMORE (AP) -- Chris Dickerson hit a three-run, game-ending homer with two outs in the ninth inning, capping an four-run uprising against Jose Valverde that carried the Baltimore Orioles past the Detroit Tigers 7-5 Friday night.
Valverde entered in the ninth inning with a 5-3 lead after starter Max Scherzer retired the final 16 batters he faced.
Nick Markakis led off with a homer before Adam Jones singled and took third on a single by Chris Davis . Valverde (0-1) then retired Matt Wieters and J.J. Hardy on popups before Dickerson hit a 2-1 pitch into the bleachers in right-center, much to the delight of the sellout crowd of 46,249.
It was Dickerson's first start since May 23 following a bout with a sore wrist. He was 0 for 3 with two strikeouts before connecting.
Darren O'Day (3-0) got the final out in the ninth for the Orioles, who have won eight of 11.
Miguel Cabrera and Avisail Garcia both homered and drove in two runs for the Tigers, who have lost four straight.
After yielding a third-inning home run to Jones, Scherzer didn't allow another runner to reach and was poised to become the first Detroit pitcher to start a season 8-0 since Jeremy Bonderman in 2007.
The right-hander struck out 10 and walked two, but he threw a season-high 119 pitches before being replaced by Valverde, who came to the mound with a 0.75 ERA.
Orioles starter Miguel Gonzalez allowed a season-high five earned runs over six innings and allowed both Detroit homers.
The Tigers went up 2-0 in the first inning when Andy Dirks singled and Cabrera hit his 16th homer the season. He's the first Detroit player to hit 12 homers in May since Willie Horton in 1968.
Baltimore got a run back in the second, getting singles from Jones and Davis before Wieters delivered a sacrifice fly. In the third, Markakis walked before Jones connected to give the Orioles a brief 3-2 lead.
A two-out RBI single by Garcia tied it in the fourth, and Detroit went up 4-3 in the fifth when Dirks and Cabrera singled ahead of a run-scoring grounder by Victor Martinez .
Garcia hit his second homer of the season for a 5-3 lead in the sixth.