Carlos Santana ruined Sanchez's no-hit bid with a two-out triple in the seventh, but Cleveland was officially eliminated from the playoffs after falling to 16-45 since the All-Star break.
"I thought I would do it," Sanchez (3-5) said of throwing his second career no-hitter. "I was trying to be aggressive, not be afraid and all my pitches were working."
Sanchez struck out seven over 6 2/3 innings as Detroit stayed one game behind the first place Chicago White Sox in the AL Central with its fourth straight win.
Ironically, the White Sox also won 5-3 as Chicago starter Francisco Liriano had a no-hitter for 6 2/3 innings against Minnesota.
"It is what it is," Tigers manager Jim Leyland said. "We're still playing for pretty big stakes, just as they are."
After Cleveland rallied, Jose Valverde, the fourth Tigers pitcher, worked the ninth for his 31st save in 35 chances.
Leyland said the win was bigger than Sanchez's bid for history and that he went to the bullpen to help the right-hander get only his second victory in seven starts since Aug. 8.
"You can't get sentimental, well maybe if you've got a 15-run lead," Leyland said. "He was throwing great, got two quick outs in the seventh, then they got a couple runs."
Detroit got only one run instead of two in the fifth for a 4-0 lead when Avila missed third.
With two outs, and Avila on second after an RBI double off Justin Masterson (11-14), Quintin Berry hit a ball into the hole at shortstop, where Asdrubal Cabrera fielded it and threw to third to try and get Avila advancing. The wild throw sent Avila home and Berry to second.
Cleveland changed pitchers and reliever Tony Sipp stepped off the rubber and threw to third on an appeal as Berry broke for the bag in an attempted steal. Third-base umpire Wally Bell ordered Berry back, since time was still out. The appeal happened again, with Berry again running, and this time Bell signaled out and took the run off the board.
"We didn't see it right off the bat," manager Manny Acta said of Avila missing the bag as he slid in. "One of our coaches went down to watch a video and we found out through that. The pitching change gave us time to appeal the play."
Leyland said Tigers third-base coach Gene Lamont saw the Indians signal third baseman Lonnie Chisenhall during the break. So Lamont met with Berry and told him to run.
"Once he explained it, I understood and it was a very smart thing," Berry said. "But I was thinking people would be saying how stupid I was. I had a feeling Twitter was going crazy on me."
The idea was to have Berry run, hoping the Indians would tag him instead of stepping on the base. If so, that play would have happened sequentially after Avila scored. When Chisenhall stood on the bag to take the appeal throw, even though he then touched Berry, the out was recorded on Avila.
Sanchez had a perfect game until hitting Shin-Soo Choo in the leg with a pitch to open the fourth. Choo was erased on Santana's inning-ending double play.
Cleveland nearly got a hit with two outs in the sixth. No. 9 hitter Lou Marson's grounder up the middle was fielded by second baseman Omar Infante behind the bag. Infante, acquired in a July 23 deal with Sanchez from Miami, whirled and made an off-balance throw that was picked by first baseman Cecil Fielder for the out.
"Great play and that's when I really thought I had a chance," Sanchez said.
Sanchez, who was 5-7 with Miami before this year's trade, threw a no-hitter as a rookie six years ago. In his 13th career start, he struck out six in a 2-0 win over the Arizona Diamondbacks on Sept. 6, 2006.
Detroit scored in the first before getting a hit. Masterson walked two and struck out two before Chisenhall misplayed a grounder that gave Detroit a 1-0 lead. Avila then hit an RBI single.
Two singles and a sacrifice fly by Austin Jackson made it 3-0 in the fourth.
Miguel Cabrera hit his 37th homer leading off the seventh for a 5-0 lead.
"A huge strikeout," Leyland said. "LaPorta runs into one there, we're in trouble."
Asdrubal Cabrera made it 5-3 with an RBI single in the eighth, after striking out three times in his first game since missing four with a sore right wrist.
Both teams said it was tough to see because of shadows caused by the 4:05 p.m., start. Cleveland struck out 13 Tigers; Detroit pitchers had 10 strikeouts. ... Leyland, on a one-year contract, says he hasn't given thought about where he will be in 2013. "I'm thinking about how to beat the Cleveland Indians," Leyland said before the game. "That will all take care of itself. There's no sense asking about it because I don't want to talk about me. We're in a pennant race. I don't want to be a distraction." ... Indians rookie RHP Cody Allen struck out all five batters he faced in relief. ... X-rays were negative on Indians INF Jason Donald's right wrist. He was hit by a pitch from Detroit ace RHP Justin Verlander on Friday night. ... Tigers OF Delmon Young didn't start. He struck out as a pinch hitter with the bases loaded in the seventh, extending his slump to 5 for 30.