DETROIT (AP) Rajai Davis hit a two-run homer in the eighth inning, and the Detroit Tigers rallied for a 6-4 victory over the playoff-chasing Minnesota Twins on Friday night.

It was the type of loss the Twins may look back on if they don't make the postseason. They entered the day trailing Houston by 1 1/2 games for the second wild card in the American League, and they led 4-1 in the seventh against the sub-.500 Tigers before the bullpen gave away the lead.

Victor Martinez tied it with a two-run double off Glen Perkins in the seventh, and Perkins (2-5) also allowed Davis' opposite-field homer to right an inning later.

More from FoxSports

Alex Wilson (3-3) got the win in relief, and Neftali Feliz pitched the ninth for his third save.

The Tigers outhit Minnesota 13-2.

The Twins took the lead in the fifth on their first hit of the game. After Minnesota loaded the bases on two walks and an error, Eddie Rosario hit a drive to right that hit a young fan's glove at the top of the high wall in right-center. The glove fell all the way to the ground, and the ball stayed in play. All three runners scored and Rosario ended up on third.

After a review, umpires called fan interference, but ruled that Rosario should stay on third. He became the first rookie to have 15 triples in a season since Ray Lankford of St. Louis in 1991.

Rosario eventually scored from third on an unusual sacrifice fly to make it 4-0. He tagged up and came home on a popup to second baseman Ian Kinsler, who made the catch on the outfield grass. Kinsler's throw was in time but bounced past catcher James McCann.

With two out in the seventh and the Tigers down by three, Kinsler hit a drive to center that bounced over the wall for an RBI double. With men on second and third, Perkins came on and walked Miguel Cabrera before allowing Martinez's tying double.

Detroit starter Matt Boyd allowed two earned runs and one hit in six innings. Minnesota's Mike Pelfrey gave up one run and six hits in five innings, striking out seven.

TRAINER'S ROOM

Twins: RHP Ricky Nolasco was reinstated from the 60-day DL after a nearly four-month stint following an ankle injury. Manager Paul Molitor said he's not sure how the 32-year-old Nolasco will be used.

Tigers: SS Andrew Romine left the game in the fifth inning with right groin soreness. ... Manager Brad Ausmus said he'd hold out hope that SS Jose Iglesias (right middle finger) might be able to swing a bat in the next couple days, but he'd be shocked if that happens.

UP NEXT

Minnesota sends Tyler Duffey (4-1) to the mound Saturday night against Detroit's Alfredo Simon (13-10).