SAN DIEGO (AP) -- It was a classic win by the punchless San Diego Padres.
''That's Padres baseball right there,'' Cabrera said with a big grin.
The Padres hit only two balls out of the infield: one that was caught by an outfielder and the other was a sacrifice fly that was caught by second baseman Josh Harrison in short right.
''There are lot of ways to win a baseball game and that was one of them,'' said manager Bud Black, who has presided over two of the three victories in franchise history in which the Padres had only one hit.
San Diego won 1-0 at San Francisco on April 20, 2010, when Jonathan Sanchez and Sergio Romo combined on a one-hitter. San Diego beat the Chicago Cubs 2-1 on July 19, 1975, when Steve Stone and Tom Dettore had a combined one-hitter.
''You never know what's going to happen in a big league game,'' Black said. ''Anytime you win it's great, but when you win a game like that where you only get one knock, it's a pretty good one. Feel good about it.''
The Padres played ultimate small-ball, scoring on a sacrifice fly, an error and a bases-loaded walk to avoid a three-game sweep. Rene Rivera's fly to Andrew McCutcheon to end the eighth was the only ball fielded by a Pirates outfielder.
''Nobody can beat us when we go 23 outs before the first one goes to the outfield,'' Black cracked.
Carlos Quentin hit a sacrifice fly in the first, but it was caught in short right by Harrison.
Ian Kennedy (5-6) won his third straight start, striking out seven and allowing two runs on five hits in six innings. He walked one. Huston Street pitched the ninth for his 18th save in as many chances.
Three Pirates pitchers issued nine walks, two intentional, and hit one batter. The Padres struck out 10 times. San Diego has only 12 hits in its last four games.
''I don't think I have ever been a part of that situation where you lose a close game on one hit, albeit a bunt,'' Pirates manager Clint Hurdle said. ''Although, they did have a bunch of baserunners.''
Liriano (1-6) walked six and struck out seven in five innings. He walked the bases loaded in the fourth inning and then walked Chris Denorfia to give the Padres a 3-1 lead.
San Diego took a 2-0 lead in the first. Denorfia drew a leadoff walk, stole second and took third when Cabrera beat out a push bunt for a single. Quentin hit the sacrifice fly caught by Harrison. His throw home was well up the third-base line. After Chase Headley was hit by a pitch, Cabrera scored on Harrison's throwing error on Tommy Medica's grounder.
''We had a runner on second base. We don't hit it that much,'' Cabrera said. ''I had Carlos Quentin behind me and I was thinking, 'Put the ball in play.' Push bunt and that's it.
''The most important thing is that we won the game,'' Cabrera said. ''It doesn't matter how.''
Said Liriano: ''It just got a little confusing. He put it in the right spot, it was a good bunt. I wasn't expecting a bunt on a 3-2 count.''
Pittsburgh pulled to 2-1 on Andrew McCutcheon's homer to left leading off the fourth, his sixth.
The Pirates added another run in the fifth when Harrison doubled in Jordy Mercer, who was aboard on a leadoff single.
NOTES: Padres RHP Andrew Cashner threw a bullpen session and could start Saturday night against Washington if he doesn't have a setback. He's been on the disabled list with soreness in his right elbow since May 15. ... The Padres recalled INF Jace Peterson from Triple-A El Paso and optioned RHP Jesse Hahn to Double-A San Antonio. Peterson, in his second stint with the Padres, started at second base in place of Jedd Gyorko, who's hitting only .162. ... Peterson hit .174 in 10 games, including seven starts, in his first stint with the Padres. ... Hahn lasted 2 2-3 innings in his major league debut in a 4-1 loss to Pittsburgh on Tuesday night. ... San Diego is off Thursday and will open a three-game series against Washington on Friday, when the scheduled starters are Tanner Roark (3-4, 3.25) for the Nationals and Tyson Ross (6-4, 2.85) for the Padres. ... Pittsburgh also is off Thursday and returns home to open a series against Milwaukee on Friday, when the scheduled starters are Kyle Lohse (7-1, 2.60) for the Brewers and Brandon Cumpton (0-2, 6.85) for the Pirates.