Updated

BALTIMORE (Reuters) - The Baltimore Orioles trailed three times against Detroit on Thursday but fought back on each occasion to score a 9-5 win over the Tigers.

Detroit had their noses in front three times but could not finish off the Orioles, who sent 10 batters to the plate in a five-run seventh inning and capitalized on four hits and three walks to erase a one-run deficit.

Adam Jones ignited the Orioles' attack with two runs scored and three RBIs, including a two-run homer in the sixth to pull Baltimore level at 4-4.

Brian Roberts led off the seventh inning with a single and Nick Markakis drew a crucial walk. Vlad Guerrero brought home Roberts with an RBI single and Markakis advanced to third on a throwing error and scored the game-winning run on a sacrifice fly by Jones.

"Hitting is contagious," Orioles third baseman Mark Reynolds said. "B-Rob (Roberts) and then Nick had a walk and Vladdy got a hit and we just kept rolling. It's just one of those back-and-forth games.

"We eventually got them there and got to their bullpen and had some key hits and ended up winning."

But it was not a hit that made the difference, said Tigers manager Jim Leyland.

"The killer at-bat was the walk," he added.

Guerrero also homered for the Orioles and Alex Avila homered for the Tigers.

Jim Johnson picked up his first win of the season, pitching the final two outs of the seventh inning and a scoreless eighth.

Brad Thomas took the loss after giving up a hit and a walk to the only batters he faced and who later came in to score.

(Reporting by Mike Mouat in Windsor, Ontario. Editing by Peter Rutherford and Alastair Himmer)