SAN FRANCISCO -- The marathon afternoon progressed, and Yankees manager Joe Torre was examining the scoreboard like some outrageous energy bill, marveling at a 17-hit attack but wondering just where all of this production went.

It powered the Yankees to only the bottom of the 13th inning. Rookie Nate Schierholtz got enough of a Scott Proctor pitch to plop safely into the outfield, lifting the Giants past the Yankees on Saturday, 6-5.

"It just wasn't our day, I guess," Torre said.

The four-hour, 34-minute affair at San Francisco's AT&T Park featured a total of 14 pitchers and 23 position players, and by the time Proctor kicked the mound for his third inning of work, both starters -- as well as Barry Bonds, who left after nine innings in a pitching change -- were long gone.

So, too, were the Yankees' numerous opportunities to win the game. The Yankees left 16 men on base and, though they tied a season high with the 17 safeties, 13 of them came off Giants starter Matt Morris, who was out of the game in the sixth inning.

"You looked up there and we scored four runs. It felt like we scored eight or nine," Torre said. "They weren't on the board. We hit the ball hard but came away empty."

The original faults began in the seventh inning, with right-hander Chien-Ming Wang guarding a two-run lead but beginning to lose command.

Wang surrendered a solo home run to Pedro Feliz -- the first homer Wang had allowed to a right-handed batter all season -- and was lifted after another hit, ending his afternoon after 6 1/3 less-than-overwhelming innings. Wang struck out none after whiffing 10 in his previous start.

"He got some pitches up and was a little uncharacteristic," Torre said. "He was a little wild and dominant, then he ... left with a lead. We just couldn't close it."

Left-hander Mike Myers came on and got the first out, but he walked Dave Roberts to put two men on, prompting another hook. Randy Winn greeted Brian Bruney with a sharp single to center that tied the game.

Two walks later, Bonds was unstrapping an elbow guard and collecting a go-ahead RBI the easy way, giving since-ejected manager Bruce Bochy's Giants their first lead of the day.

It would last all of two innings in San Francisco, as Rodriguez returned to center stage. A clutch performer in ninth inning all season long, Rodriguez has become doubly potent since heading west to China Basin, a ballpark he adores and has proven a passion for hitting in.

Reliever Brad Hennessey, the fifth Giants pitcher, was no match. Rodriguez ripped a 2-1 offering deep over the 399-foot mark in dead center field, clearing a second barrier and bouncing onto a concourse, where a fan fired A-Rod's 28th home run ball back onto the outfield grass.

The home run, Rodriguez's seventh ninth-inning homer of his imminent All-Star campaign, was the third of four hits for the third baseman on Saturday. Rodriguez has made outs in just two of his 12 plate appearances since checking into a San Francisco hotel room, and he is a lifetime 22-for-33 hitter in the city limits.

"He's been huge for us, no question," Torre said. "I see him when he goes up there, and he just seems to have a plan. ... He's been there for us. He's so different this year, it just seems. He seems to be in such a rhythm now."

A-Rod's heroics, though, only got the Yankees back to even.

"It's frustrating, whether you go 0-for-5 or 5-for-5," Rodriguez said. "The goal is to win."

From there, it was a battle of the bullpens and shot opportunities, most strikingly the Bombers' inability to capitalize on a bases-loaded, one-out situation in the 11th.

Kevin Thompson started the inning with a single to center and was erased on a botched Bobby Abreu sacrifice, but Rodriguez was clutch again, drilling a double down the left-field line. An intentional walk filled the bags for Hideki Matsui, but veteran left-hander Steve Kline worked ahead with his slider and quickly put the outfielder down via strikeout.

"I didn't have a chance to get set, and it was already two strikes," Matsui said through an interpreter. "In that sense, it wasn't a very good at-bat."

"We battled, we battled and we had opportunities to open the game up; we just didn't get it done," Torre said.

With the Yankees silenced, the Giants made their bid to end the day off a tiring Proctor in the 13th inning.

Pitching in his third straight game and having given up Bonds' 749th home run less than 24 hours prior, Proctor's stamina was enough of a concern that Roger Clemens preached his availability and trotted down to the bullpen, beginning to warm up just in case.

"I had enough to get outs," Proctor insisted.

In fact, Torre said, Clemens would have become the eighth New York pitcher had the game moved on to another frame. The Giants kept that from reality.

Ryan Klesko opened with a single to right, then moved to second on a sacrifice bunt. An out later, Omar Vizquel -- after narrowly missing two foul extra-base hits down the left-field line -- legged out an infield hit, eluding Proctor's leaping grasp and beating a throw from shortstop Miguel Cairo with a headfirst slide. Cairo started the game at first base but was moved to shortstop when Derek Jeter left the game early with a left hip strain.

Vizquel's single put the winning run 90 feet away, and Schierholtz's shallow pop was enough to bring it in, plopping in front of a sliding Melky Cabrera and handing the Yankees their fourth loss in five games since leaving New York.

"Every game's big, especially with as many games back as we are," Proctor said.

This one, Torre said, couldn't be blamed on the bats -- particularly the top of the lineup, which combined to provide 13 of the 17 hits and scored all five runs, three by Rodriguez.

"I have no complaints," Torre said, "other than the final score."