Russell Martin drilled a Luke Putkonen fastball off the left-field wall with the bases loaded in the 11th to score Neil Walker and give the Pirates a 1-0 win at PNC Park.
"To make it happen, you have to believe it," said Martin. "You have to have a positive mindset if you want good things to happen. Every situation, I believe I can get it done. Does it happen? No. But I have the same mindset."
Walker singled to lead off the 11th, then Andrew McCutchen and Gaby Sanchez followed with a walk and a single, respectively. Martin ended it with a 400-foot single to one of the deepest parts of PNC Park.
The Tigers left 11 runners on base and went 3-for-13 with runners in scoring position, but couldn't crack the egg on the scoreboard. The Pirates held one of baseball's most deadly offenses scoreless for 31 of the final 32 innings of the home-and-home series. Detroit entered the game with the second most runs scored in baseball.
"It just goes back to the staples that we talked about in Spring Training: Intent with every pitch, conviction, let chips fall where they may," said Pirates manager Clint Hurdle, whose club has four 1-0 wins in its last 11 games. "We've just done a very good job of taking care of business on the mound."
Jeff Locke did what Hurdle has asked of his rotation since March. He allowed seven hits and a walk with three strikeouts in 5 1/3 innings. Locke put two runners on in the sixth before Vin Mazzaro came on to pitch with one out.
Mazzaro struck out Matt Tuiasosopo and got Brayan Pena to ground out and strand a pair of runners. Locke has now pitched 19 1/3 consecutive scoreless innings, but to keep that streak alive, he had to weasel his way out of another jam in the fifth on his own. He got a little help from his defense.
Travis Snider threw a laser from right field to nail Tuiasosopo at the plate after the Tigers had singled three times to start the inning. With the bases loaded, third baseman Brandon Inge jumped to snag an Omar Infante chopper and fired home for the second out. Andy Dirks grounded out to second to end the inning and keep the game scoreless.
"Runs have been scarce, and sometimes you get a little antsy," Tigers manager Jim Leyland said of third-base coach Tom Brookens' decision to send Tuiasosopo home. "If there's two outs, that's a no-brainer, maybe even with one out. But with no outs, I'm sure Tommy would like to have that one back."
Mazzaro put two runners on in the seventh, but got Dirks to pop out to shortstop before Miguel Cabrera -- who had already doubled twice, including the 400th of his career -- grounded out to second.
"You've really got to like our chances anytime a starter comes out and hands the ball to the bullpen," Locke said. "They've been fantastic this year. We've come to expect it."
Starter Doug Fister struck out a season-high 12 batters in seven innings for the Tigers, allowing just four hits. He even had a single of his own in the fifth.
Mark Melancon pitched a masterful 10th for the Pirates, making Cabrera and Prince Fielder both take foolish swings, then Bryan Morris pitched a scoreless 11th and picked up his second win in as many nights to clinch the series.
In each of their five four-game sets this season, the Pirates have lost the first game and come back to win the next three -- counting the two-game, home-and-home set against Detroit as the same series, which Hurdle does.
Hurdle was proud of how his team battled against the 2012 American League pennant winners, and said this serves as tangible evidence of success for his players to point to. But it's still a series at the end of May, and the season is just 33 percent complete.
"We've got a lot of season in front of us," Hurdle said. "These are markers along the way that you like."
Steven Petrella is an associate reporter for MLB.com.