SAN FRANCISCO (AP) — The way the Pittsburgh Pirates are winning with contributions from everybody, Jordy Mercer is thrilled to do his part whether in the lineup or coming off the bench.
Of course he prefers to play, and with his power swing working he might keep getting his chances.
Mercer broke a fifth-inning tie when he homered for the second day in a row, Francisco Liriano struck out six to win his second straight decision and the Pirates beat the San Francisco Giants 5-2 on Wednesday for a three-game sweep.
Pittsburgh's other shortstop, Jung Ho Kang, hit a two-run double as a pinch-hitter in the ninth.
"That's what it takes to be a championship team, even the bullpen, guys picking each other up," Mercer said. "We're going to need that depth."
Liriano (3-4) allowed four hits while outdueling Tim Hudson (3-5), who struck out six over seven innings but lost his fourth straight outing against the Pirates.
The pitchers had the first hits of the game after each retired the initial eight batters in order, Liriano with a single in the top of the third and Hudson with a double in the bottom half.
The Pirates have won 12 of their last 16 games and bounced back from a losing series at San Diego last weekend.
"We don't let one game roll into the next. We've been going to work here for three days," manager Clint Hurdle said. "I just like the fact we've been able to turn our season in a much better direction than we were almost two weeks ago Friday."
Pirates left fielder Jose Tabata fell backward after crashing hard into the wall trying to catch Hudson's ball but stayed in the game.
Tabata hit a tying single in the fourth. Mercer followed his home run with a ninth-inning double, and Francisco Cervelli singled in a run.
Four of Mercer's 23 big league home runs have come in 10 games at AT&T Park.
Jared Hughes pitched the eighth and closer Mark Melancon followed Rob Scahill with the bases loaded in the ninth to finish for his 16th save after allowing Brandon Crawford's RBI groundout.
Hudson, who has received just 17 runs of support in 11 starts, took a ball off his right leg on Mercer's comebacker for the second out of the third but stayed in the game.
The Giants lost their fifth straight game, their longest skid since dropping eight in a row April 10-17. The Pirates earned their first sweep in San Francisco since Aug. 10-12, 2007.
"They are a hot team. They pitch well. They get timely hits. We couldn't mount any offense," Giants manager Bruce Bochy said. "Hudson pitched well, what a gutty effort. He got hit pretty good but shrugged it off and threw a good game for us."
San Francisco led in each of its last four losses.
Nori Aoki was thrown out stealing third in the third, and Bochy challenged the call. It was upheld after 3 minutes, 31 seconds.
WHITE HOUSE VISIT
Reigning World Series champion San Francisco will visit the White House for the third time in five years Thursday, then travel by train to Philadelphia.
"It's a fun time for all of us, a special time. You're getting honored," Bochy said. "The ring ceremony, the parade, this is the last part of the success you had the previous season."
Former player Michael Morse will join the Giants in Washington. He is on the DL with the Marlins.
Pirates: Starling Marte, with just one hit in his last 23 at-bats since a home run Thursday at San Diego, was left out of the starting lineup and then entered as a pinch runner. "Give him a break, back him away," Hurdle said. "Sometimes he just gets in a hurry to hit. Sometimes what makes you laugh makes you cry."
Giants: RF Hunter Pence had the day off to rest his bruised wrist from making a diving catch to rob Andrew McCutchen on Monday night, while SS Brandon Crawford rested a tight calf before entering the game late. ... RHP Jake Peavy tested his strained lower back with a 40-pitch bullpen and will start Saturday for Triple-A Sacramento in the first of a few rehab outings. ... RHP Matt Cain (elbow) threw 42 pitches in three innings of an extended spring training game in Arizona.
Pirates: RHP Charlie Morton starts Friday's opener at Atlanta.
Giants: Friday starter Tim Lincecum (5-3) will skip the White House and fly separately Thursday morning — after the team's overnight flight — to get rest in Philadelphia. It was the two-time NL Cy Young Award winner's choice.