AP Baseball Writer
SAN FRANCISCO (AP) -- Clint Hurdle says he and a pal often marvel over how there's always something new to see at a baseball game.
Too bad for Hurdle, what we watched Wednesday wrecked the Pittsburgh Pirates in a 7-5 loss.
A timely, heads-up glance by reliever Jean Machi helped San Francisco take advantage of a gaffe on the bases by Pittsburgh, and the Giants tagged out of two runners who wandered away on the same play grab momentum and end a six-game losing streak.
"You know, I have a buddy and we always talk about how if you watch enough games you'll continually see something you have never seen before," Hurdle said. "Unfortunately that's the first time I've seen us walk into a double play."
The Pirates, who had won three in a row, led 5-4 in the sixth when Chris Stewart drew a one-out walk with runners on second and third.
Machi (6-0) got the ball back from the catcher and noticed Travis Snider had left second base, apparently thinking it was a bases-loaded walk.
"Absolutely! It was 100 percent mental error on my part," Snider said. "Offensively we could have made something happen. Honestly, I was thinking about getting to third base and if he walked I'd get to third. That's obviously not what you want to happen when you have first open. I take ownership for that mistake."
Machi threw to shortstop Brandon Crawford to trap Snider. When Gaby Sanchez strayed off third, Crawford threw to Machi to start a rundown, and third baseman Pablo Sandoval eventually made the tag.
"You don't see that very often. We got a break there," manager Bruce Bochy said. "I haven't seen that. He must've thought the bases were loaded, going to third."
San Francisco stopped a slump that matched its longest of the season, and avoided the club's first winless homestand of at least seven games in the 15-year history of AT&T Park.
Gregor Blanco hit a tying single in the seventh, and a passed ball by former Giants catcher Stewart later in the inning put the Giants ahead. Justin Wilson (3-2) took the loss.
Santiago Casilla, San Francisco's fifth reliever after Tim Lincecum's short start, earned his eighth save in 11 chances.
Jordy Mercer hit a two-run homer in the fourth and Josh Harrison also connected for the Pirates, who left manager Clint Hurdle baffled.
The Giants' runs were more than the six they had total in the previous six games.
HARRISON'S POP: Harrison's ninth home run was his fourth longball in as many games -- most by a Pirate since Pedro Alvarez also homered in four in a row from June 20-23, 2013.
The Pirates have nine homers in their last five games.
"We call it game-time pop," Hurdle said.
MORTON'S MECHANICS: Charlie Morton allowed six straight San Francisco batters to reach base while falling behind 3-0 in the first and faced regular deep counts while struggling through five innings.
Yet Pittsburgh rallied to stay in the game before losing for only the fourth time in 12 games during a stretch of 15 straight and 18 in 21 against the NL West.
"The story was a passed ball and some things happened that normally don't happen," Hurdle said. "We have to kick this one to the curb and move on."
QUOTABLE: On his 57th birthday, Hurdle offered: "All I want for my birthday is another birthday. I'm good now and could go out tomorrow and have no regrets."
TRAINER'S ROOM: Pirates: Outfielder Starling Marte needs more time to recover on the concussion list and wasn't activated Wednesday when eligible. He went through his first full workout Tuesday, then had a recovery day Wednesday. He is likely to need a rehab assignment.
Giants: Bochy is optimistic of getting first baseman Brandon Belt back from a concussion as soon as this weekend against the Mets in New York, while center fielder Angel Pagan could play in a rehab game in the next couple of days in Arizona as he returns from an inflamed back. Right-hander Matt Cain was being re-evaluated Wednesday as he tries to recover from an elbow injury in his throwing arm.
ON DECK: Pirates: Jeff Locke (2-2) starts Thursday night at Arizona.
Giants: Ryan Vogelsong (5-8) pitches Friday night vs. the Mets at Citi Field to start an 11-day, 10-game road trip.
Copyright 2014 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.