SAN FRANCISCO - A dozen Giants dashed from the dugout toward first base and danced past Antonio Bastardo, who lugged a loss with him as he walked to the Phillies clubhouse and a flight to Phoenix. The home team wanted to pound Andres Torres. He flared a single to right in the 10th inning for a 4-3 win Wednesday at AT&T Park.

The road team departed with confidence. The Phillies' last-minute comeback and chance for their first sweep in San Francisco since 1984 was spoiled. But they played crisp baseball against a talented squad for three days, and most drew comfort from that.

"We'll take it," Jimmy Rollins said. "It wasn't ideal, given the situation. Had it been a 1-1 series, we'd be happy to take two. But we had a chance to put them away. We came back in the ninth and gave ourselves a shot to actually win it. The way we wanted to play it is what matters most. We can stand tall on that and hopefully take that to Arizona and throughout."

In the manager's office, Charlie Manuel shared the rosy outlook. Sort of.

"I looked at those three games in New York and thought they could build upon it," Manuel said of the Phillies' sweep of the Mets. "These games here have been exciting, and we played good, and we had a chance to win. We didn't get it done today. We were right there."

The Phillies forged a tie in the ninth with two runs off stingy San Francisco closer Sergio Romo. Bastardo, one pitch away from escaping, wasted it in the 10th.

An upbeat Phillies offense was stopped by Barry Zito, the junkballing, $126 million lefthander with more lives than a cat. In his latest renaissance, Zito has allowed one earned run or less in six of his seven starts.

"I saw the guy I thought we'd see," Manuel said.

The Phillies sprang to life in the ninth when Romo entered. Rollins started it with his second double of the game. Michael Young walked, and Chase Utley drilled an RBI single to center. Young scampered from first to third, and Utley advanced to second on the late throw. It was shrewd baserunning.

That put Michael Young in position to score on a fly ball to right by Delmon Young to tie the game. Romo blew a save for the third time in his last 29 chances.

The Phillies have led baseball in stolen-base percentage every season since 2007. They ranked below the major-league average entering Wednesday. Two more outs on the bases scuttled other scoring opportunities.

With one out in the sixth, Rollins doubled. But he was thrown out trying to steal third while trailing with one out. Before that, Rollins was 42 for 45 when stealing third since 2008.

"With one out, that's when you're going to try to take chances right there," Rollins said. "Zito's a breaking-ball pitcher. It was a breaking-ball count. Put those things together, and it's a situation where we can tie the ball game. He threw a fastball. They got me."

He redeemed himself in the ninth by starting the game-tying rally. The Phillies kindled another in the 10th when Ben Revere singled off the pitcher's glove. Manuel flashed the steal sign. Revere's hand touched second before Brandon Crawford tagged his leg. Umpire Alfonso Marquez called Revere out.

"I was safe," Revere said. "It just kind of ticked me off. I was very upset."

Manuel oversaw his 1,331st game as Phillies manager, which tied Gene Mauch for the most in franchise history. He will become the longest-tenured manager Thursday in Arizona, where this Western swing continues. The initial returns are favorable, but on Wednesday Manuel was left wanting more.