With a late-game rally that was equal parts American League thunder and National League small ball, the Pirates on Thursday upended the Detroit Tigers, 5-3.

In the seventh inning, the Pirates batted around against right-hander Anibal Sanchez and erased a two-run deficit. Five straight batters reached base and did all the damage on two singles, two doubles and a walk

“Everything happened so fast. I don't know if (the Tigers) really had a chance to understand the situation,” said outfielder Travis Snider, who scored the final run on a suicide squeeze. “Before they could get anything going in their bullpen, we took advantage.”

Early on, Sanchez was dominant. He gave up one run and two hits and racked up eight strikeouts through the first six innings.

With one out in the seventh, Garrett Jones dropped a single into center field. Russell Martin walked. Pedro Alvarez lined a two-run double. On the next pitch, Snider banged a double off the Clemente Wall to give the Pirates a 4-3 lead.

“It kind of came from nowhere,” shortstop Jordy Mercer said. “(Sanchez) was dealing. But then we got it rolling. Nobody wanted to get out. It was pretty cool.”

After Snider went to third on a wild pitch, manager Clint Hurdle called for a squeeze.

“It just seemed like the right time to push the envelope a little bit and get another run,” Hurdle said.

Mercer laid down a perfect bunt, scoring Snider. The Tigers were so discombobulated, no one covered first base, and Mercer also was safe.

“You've got to remain focused and just put it into fair territory somewhere,” Mercer said. “Travis is coming down the line, going hard, so if I put it in fair territory, he's going to be safe.”

Bryan Morris (2-2), who tossed one scoreless inning, got the win.

Righty A.J. Burnett got a no-decision, leaving him winless in his past five starts. He pitched six innings and left with the Pirates trailing, 3-1.

Going into the game, Burnett ranked 90th among all NL starting pitchers in run support. The Pirates averaged 2.45 runs scored over his first 11 starts.

Neil Walker led off the bottom of the fourth inning by whacking the first pitch from Sanchez (5-5) over the right-center field wall. That gave the Pirates a 1-0 lead and capped an impressive run of consecutive swings by Walker.