Updated

Nate McLouth hit a go-ahead, two-run triple and the Baltimore Orioles rallied to beat the Detroit Tigers 7-5 on Sunday.

McLouth, Nick Markakis and Mark Reynolds each had two hits for the Orioles, who have won five of seven, including the last two of the key weekend series at Detroit. Chris Davis homered for the second straight game and J.J. Hardy had a two-run double.

Baltimore leads Detroit by two games in the race for the second wild-card spot in the American League.

The Tigers jumped all over Wei-Yin Chen (12-7), scoring five times with one out in the first. Omar Infante hit a solo homer, Miguel Cabrera walked and Prince Fielder singled to left before Jhonny Peralta drove a 2-0 pitch over the wall in center to make it 4-0.

Delmon Young singled and scored on Jeff Baker's double before Chen retired two in a row to end the inning.

The Orioles responded in the second against Doug Fister (7-8), one of the American League's hottest pitchers since the All-Star break. Davis connected for his 20th homer, Markakis doubled home a run and Hardy had his big hit that trimmed Detroit's lead to 5-4.

McLouth, who entered with just four RBIs for the season, put the Orioles in front with two out in the fourth, and Davis drove him in with a base hit. That knocked Fister out of the game, having allowed as many earned runs as his previous five starts combined.

Fister allowed eight hits, struck out six and walked three. The right-hander was 6-1 with a 1.97 ERA in his previous eight starts.

Detroit put two runners on with no outs in the seventh but Darren O'Day struck out Cabrera on three pitches and got Fielder to bounce into a double play.

Jim Johnson worked the ninth for his 37th save in 40 chances. The right-hander is now tied with Gregg Olsen for the second-most saves by an Oriole. Randy Myers had 45 in 1997.

NOTES: Erik Bedard was the last Oriole to win 12 or more games in a season, picking up 13 victories in 2007.