SAN FRANCISCO -- A day after the Giants altered the top of their lineup by trading Eduardo Nunez, they had another productive day in a series-clinching 2-1 win over the Pirates. No. 3 hitter Brandon Belt delivered the go-ahead RBI and Joe Panik -- batting second in place of Nunez -- scored another run on a Brandon Crawford groundout to help San Francisco break even at .500 on its lengthy 10-game homestand.
Jeff Samardzija, in his last showing before Monday's non-waiver Trade Deadline, had arguably his best start since the beginning of June, spinning seven innings of one-run ball while allowing four hits and striking out eight to give the Giants another quality start. Francisco Cervelli's seventh-inning single was the first hit for the Pirates after 13 in a row had been retired.
"He looked great, didn't he?" Giants manager Bruce Bochy said of Samardzija. "He's had some bumps in the road, but he's thrown the ball very well at times. At times, he probably should have had a win and we just couldn't score enough runs. We barely did today."
Josh Harrison and Adam Frazier powered the Bucs' offense -- each tallying two hits -- while John Jaso scored Pittsburgh's lone run on Frazier's double in the second inning.
Pirates righty Trevor Williams had an equally impressive showing, lowering his season ERA to 4.53. He allowed a run in the first inning, but he settled down to last six innings, allowing just one run and five hits.
"What a good execution of the game plan," Pirates manager Clint Hurdle said. "Execution of the fastball, slider, and using his changeup to both sides. Really well pitched."
Giants stand-in closer Sam Dyson entered in the ninth to record his sixth save in as many attempts. He threw a 1-2-3 inning, giving him a 2.33 ERA with the Giants.
"He's back to what he was last year, commanding the ball," Bochy said. "He's got the poise you love from a closer. We lost Mark [Melancon], so we needed some help, and this couldn't have worked out better."
MOMENTS THAT MATTERED
Out of nowhere:Starling Marte, a two-time National League Gold Glove Award winner, made a costly mistake during the seventh inning. Belt popped up a towering shot to left field -- an otherwise routine play -- but Marte appeared to lose it in the San Francisco sun. The ball dropped and Belt was credited a double, which scored pinch-hitter Miguel Gomez, the deciding run. Gomez, a rookie, tallied his second double of the season in 17 at-bats.
"I heard the sound of the crack of the bat, and I knew the ball came off pretty hard and strong," Marte said through translator Mike Gonzalez. "I tried to get the best judgement on the ball. As I was reading it, the wind started taking it away. Just, unfortunately, what happened happened."
Shark's glove: Helping his own cause, Samardzija made a nifty play in the second inning to limit the Pirates' damage with the bases loaded and one out. He barehanded a grounder from his counterpart, Williams, moving towards third and making an off-balance throw from his right hand to catcher Buster Posey, who was patiently waiting for the force out. The heads-up play limited what could have been a big inning for the Bucs.
"That was just a lack of other options and had to make a play," Samardzija said. "I was just doing the only option I had. I didn't think I had a chance at first."
"I tried to lift it," Williams said. "He made a great play. That really earned him the win today. He pitched great. That was a big out for him to get."
"I wasn't in any trade talks. Maybe some people using my name for value and trying to strong-arm other teams to get a better deal for what they want, but I love being here." -- Samardzija, when asked about his name popping up in Trade Deadline rumors
"One time, he was the best wide receiver in Chicago, might have included the pro team. He's athletic, very athletic." -- Hurdle, on Samardzija's time at Notre Dame and his barehanded play
SOUND SMART WITH YOUR FRIENDS
Posey was intentionally walked twice by the Pirates. Posey had been intentionally walked only four times before that, including two times by the Tigers on July 5.
"He's the guy in that lineup that's special and has been an elite hitter," Hurdle said. "We saw enough of it in the first two games that it wasn't going to happen today. Somebody else was going to get us."
Pirates: Following a Thursday off-day, the Pirates continue their swing through California with a three-game set against the Padres in a 10:10 p.m. ET contest. Chad Kuhl will start, and he's had his best month of the season, posting a 3.25 ERA over five starts.
Giants: Left-hander Matt Moore seeks his first win since June 20 when San Francisco opens a three-game series against the Dodgers in Los Angeles on Friday at 7:10 p.m. PT. Moore (3-10, 5.82 ERA) has pitched past the sixth inning once in his past five starts.
Watch every out-of-market regular-season game live on MLB.TV.