DETROIT (AP) -- Andy Dirks hit a little flare to left that dropped just over shortstop Erick Aybar to score a run. Two innings later, Jhonny Peralta's line drive stayed barely fair down the left-field line, putting Detroit ahead.
They were the types of close plays that can swing a playoff race, and for the Tigers right now, every win is critical.
Peralta hit a two-run double during a three-run eighth inning that sent Detroit to a 5-3 victory over the Los Angeles Angels on Saturday night.
The Tigers trailed 3-0 before scoring twice in the sixth and taking the lead in their last at-bat.
''Sometimes the ball bounces your way and sometimes it doesn't,'' Dirks said. ''Tonight it bounced our way when we needed it to. That's part of playing baseball.''
With men on first and third, Peralta's line drive off Garrett Richards (3-3) was too hard for third baseman Alberto Callaspo to grab and went down the line to score two runs and give the Tigers a 4-3 lead. Alex Avila then added an RBI single.
''Callaspo was close to catching the ball,'' Peralta said. ''I felt like, 'Wow, if he catches that it will be unbelievable.' Because I've hit a lot of balls to people.''
Octavio Dotel (4-2) threw two scoreless innings for the win. Jose Valverde pitched a perfect ninth for his 26th save in 30 chances.
Detroit trails the first-place Chicago White Sox in the AL Central by 2 1/2 games. The Tigers trail Baltimore and Oakland by one game for the second wild-card spot. The Angels are 3 1/2 games behind the Orioles and A's.
Vernon Wells homered for the Angels, who had won four straight. Bobby Wilson hit a drive down the left-field line in the fourth that went just foul, narrowly missing a two-run homer that would have made it 5-0.
''Luckily, it went just foul, but people foul balls off that barely miss all the time, so you've just got to go to the next pitch and make a better one,'' Detroit starter Drew Smyly said.
Dan Haren, who threw two complete games against Detroit in July 2011, went only 5 2-3 innings in this one. He allowed two runs and eight hits with seven strikeouts.
Smyly allowed one earned run and four hits in six innings for the Tigers in his return from a strained muscle in his right side. The rookie struck out six and walked two.
Albert Pujols missed a third straight game for the Angels with a right calf injury. Miguel Cabrera was the designated hitter for Detroit - he's been battling right ankle soreness.
Cabrera hit a drive to deep right-center leading off the eighth, but Torii Hunter was able to make the catch after nearly overrunning the ball from right field. Hunter also took away a potential extra-base hit from Cabrera with a running catch in the opposite direction in the fourth.
The Tigers kept swinging, though, and Prince Fielder and Dirks both singled before Peralta's big hit.
''They put some balls in play that were just out of the reach of guys,'' Richards said. ''Probably, that ball that Peralta hit was up in the zone.''
Smyly was starting in place of Doug Fister, who has been bothered by tightness in his right groin. He allowed a third-inning solo homer to Wells and didn't get much help from his defense after that.
Second baseman Omar Infante threw away a routine grounder by Wilson for an error later in the third, and Wilson eventually scored on Howie Kendrick's single.
The following inning, Kendrys Morales lifted a deep fly ball to center. Austin Jackson was able to run it down without too much trouble, but he ended up dropping it for his first error since June 29, 2011. Aybar followed with a double to drive in Morales.
Detroit chased Haren in the sixth with an RBI double by Delmon Young and a bloop single to left by Dirks that scored Young.
Jordan Walden came on and got out of that jam by getting Peralta on a groundout. He also got one out in the seventh before Richards entered.
The Tigers missed a chance to score in the second when Fielder doubled to right but went sprawling past second base when Hunter's throw came in. He was tagged out, and Young followed with a double.
NOTES: Kendrick extended his hitting streak to 12 games. ... Young and Fielder both had three hits. ... Mark Trumbo struck out three times for the Angels. ... Detroit RHP Max Scherzer (13-6) starts Sunday against Los Angeles RHP Ervin Santana (7-10).
- Jhonny Peralta