Doug Fister allowed two runs on eight hits and a walk, striking out seven, in 6 1/3 innings to ensure the outburst in the fourth was all the offence the Tigers needed to seal a play-off spot for the third year running.
The win also left them one win away from clinching the American League Central.
Michael Wacha came agonisingly close to a no-hitter in just his ninth big-league start as the St Louis Cardinals beat the Washington Nationals 2-0 to trim their magic number to three.
The Nats were down to their last out when Ryan Zimmerman chopped the ball inches over the outstretched glove of Wacha to break up his no-no bid in cruel fashion with an infield hit.
In the end Wacha threw 8 2/3 scoreless frames, allowing just one hit, striking out nine and walking two, while getting an RBI apiece in support from Shane Robinson and Yadier Molina.
Jason Giambi cracked a mammoth pinch-hit two-run walk-off homer to give the Cleveland Indians a 5-4 win over the Chicago White Sox.
The White Sox had homered twice in the top of the ninth through Dayan Viciedo and Alejandro De Aza to take a one-run lead, but Giambi hit back to seal victory in dramatic fashion and cut the Indians' magic number for a wildcard spot to five.
The Indians remained one behind the Tampa Bay Rays, who beat the New York Yankees 7-0 for their fifth straight victory.
Matt Joyce's solo shot highlighted a three-run first for the Rays, while David DeJesus drove in a pair on two hits.
Adrian Beltre's tie-breaking solo-shot in the sixth gave the Texas Rangers a 3-2 win over the Houston Astros, keeping them within a game of the Indians in the wildcard race.
The Atlanta Braves walked off on Andrelton Simmons' RBI single as they retained their half-game lead over the Cardinals in the battle for homefield advantage in the National League with a 3-2 win over the Milwaukee Brewers.
In the American League the Boston Red Sox held on to their one-game advantage despite losing 8-3 to the Colorado Rockies as the the Oakland Athletics were also beaten, 3-0 by the Los Angeles Angels.
Jason Vargas threw a complete-game shut-out for the Angels, scattering four hits while striking out five and walking one.
Gerrit Cole threw six innings of two-run ball and added a two-RBI single as the Pittsburgh Pirates kept within two of the Cardinals in the NL Central, also taking sole possession of the top wildcard spot, by beating the Chicago Cubs 8-2.
The Cincinnati Reds fell a game behind the Pirates as they lost 4-2 to the New York Mets, Daniel Murphy belting a three-run homer as part of a four-run second.
The Kansas City Royals fell to the brink of elimination from the wildcard race with a 4-0 loss to the Seattle Mariners, while the Los Angeles Dodgers were 2-1 winners over the San Francisco Giants.
The Toronto Blue Jays beat the Baltimore Orioles 3-2 in 10 innings, the Philadelphia Phillies edged out the Miami Marlins 2-1 and the Arizona Diamondbacks beat the San Diego Padres 2-1 in 12 innings.