Updated

Anibal Sanchez zipped through six innings against the Pittsburgh Pirates so easily on Wednesday night the bullpen was quiet when the Pirates came to bat in the seventh.

By the time reliever Drew Smyly was warm, the damage had already been done.

The Pirates erased a two-run deficit with an improbable four-run rally off Sanchez and the Tigers fell 5-3.

"I think I missed some pitches and they hit them," Sanchez said. "I take responsibility; that's part of the game. Before that inning I thought everything was working good, especially location."

Certainly looked like it. Sanchez (5-5) retired 16 of 17 at one point, his only mistake a solo home run by Pittsburgh's Neil Walker in the fourth.

"I'm not really sure what happened," Detroit manager Jim Leyland said. "He was throwing the ball extremely, extremely well. We just lost it a little bit, got out of sync for a few hitters and it cost him."

Miguel Cabrera hit his 15th homer of the season for the Tigers but flied out to the right-field wall with a runner on to end the game as Pittsburgh beat the Tigers for the second straight night. Andy Dirks added an RBI-double for Detroit, which appeared firmly in control after Cabrera put a 92 mph A.J. Burnett fastball into the right-field seats in the fifth.

Pittsburgh's Andrew McCutchen lined out to start the seventh when things quickly fell apart for Sanchez. Garrett Jones singled, Russell Martin walked on four pitches and Pedro Alvarez doubled to the gap in left-center to plate both runners. Travis Snider followed with a double off the wall in right as Alvarez slid home to give the Pirates the lead. Snider moved to third on a wild pitch and Jordy Mercer laid down a bunt and a two-run hole turned into a two-run lead in the span of five minutes.

"I don't think as a team we ever check out in the seventh inning," Snider said. "We've had a lot of late comebacks; we've had a lot of great rallies off bullpens and starters late in the game."

Bryan Morris (2-2) picked up the win in relief of A.J. Burnett. Jason Grilli pitched the ninth for his major league-leading 22nd save.

Sanchez tossed his fourth career one-hitter in his previous start, an easy 6-0 romp over Minnesota last week. He had allowed four runs in just one start this season before matching that number with one poor inning.

"We knew as hitters we had to grind," Snider said. "If he's going to make a mistake, it's going to be early. Pedro did a great job jumping on him early, so did Jones. Russell the same thing, getting on base. Before they were able to get anything going in their bullpen we were able to get to him in that inning."

Sanchez was done after giving up five runs on seven hits in 6 2-3 innings, walking one and striking out nine while his ERA rose from 2.38 to 2.79.

"I don't know, I did the same things as I did earlier in the game -- I don't know what happened in that inning," Sanchez said. "The bad thing is that we lost, no matter what happened."

Pittsburgh's late surge allowed Burnett to escape his fourth straight loss. The Pirates have struggled to support their ace this season and had scored just five runs total in his previous five starts.

The right-hander had issues with his command but managed to stay out of trouble until the fifth, when Kelly's leadoff walk started a three-run burst. Burnett gave up three runs on five hits, walking four and striking out four.

Burnett was long gone by the time Alvarez got things going. Tony Watson worked the eighth and Grilli — who struck out the Tigers in order in the 11th on Tuesday — stayed a perfect 22 for 22 in save chances when Cabrera flied out. Pittsburgh is 30-0 when leading after eight innings.

NOTES: Detroit OF Torii Hunter sustained a contusion on his left elbow after getting hit by Morris' fastball in the seventh. Hunter said the pain made him "dizzy" but X-rays were negative ... Detroit CF Austin Jackson is likely heading to Triple-A Toledo this weekend while he recovers from an injured left hamstring that's had him on the disabled list since May 12. Leyland said he'd like to test Jackson's hamstring before activating him ... The series concludes on Thursday. Pittsburgh's Jeff Locke (5-1, 2.45 ERA) will look for his sixth straight victory. Doug Fister (5-2, 3.65 ERA) starts for the Tigers.