Updated

Charlie Morton was able to put his first bad start of the season behind him. But the Pirates couldn't win because they were done in by speed.

Morton pitched well enough to surpass last season's win total in his fourth strong outing in five starts this season but Darren Ford's speed gave San Francisco the tying and winning runs in a 3-2 win over Pittsburgh in 10 innings on Tuesday.

Ford remarkably scored from third on a ball hit to the second baseman in a drawn-in infield in the 10th inning, helping the Giants snap a season-high four-game losing streak with a 3-2 win over the Pirates on Tuesday night.

"I saw him, and he was stopped," second baseman Neil Walker said. "I made the play to first — I probably could have thrown the ball a little firmer, but that guy can run."

Sure can. Ford had got to third base to from first on an errant pickoff throw by Joel Hanrahan (0-1).

It also got Ford around the horn and home with the tying run after entering the game as a pinch runner in the eighth.

Ford, a rookie without a hit in the majors, reached in the 10th when Nate Schierholtz — who led off with a double — was thrown out at third on Ford's sacrifice attempt. But Ford found his way around the bases anyway.

"I didn't go at first," Ford said of the ball hit by Freddy Sanchez off of Hanrahan with one out. "Not at first, but he just glanced at me. He didn't stop me as an infielder — he didn't stop me; he just glanced at me. And once he just glanced at me and then lobbed it over to first, I just took off and let my God-given talent just take over."

First baseman Lyle Overbay's throw was errant home on the scoring play, but the official scorer did not charge an error on the play because it appeared Ford's speed was going to make him safe anyway.

"In that situation, we need a little more firm throw (from Walker), that was it," Pirates manager Clint Hurdle said.

"That was a very aggressive play, a very gutsy play, and Lyle was actually kind of feeling (Ford) might try it. If we had two firm throws on target, things might have been different."

"I tell you what," Giants manager Bruce Bochy said, "that was one of the most impressive displays of speed I've seen on a baseball field."

Garrett Jones hit his team-high fourth homer for the Pirates, who have lost five of seven.

The Giants scored all their runs on plays that did not involve a hit.

In the eighth, Ford went from first to third on a hit-and-run play with Sanchez up that turned into a single on what would have been a routine grounder to what was now the displaced shortstop. He scored two batters later on Buster Posey's sacrifice fly to tie the game at 2.

The Giants' first run also came on a sacrifice fly — Aubrey Huff drove in Aaron Rowand in the sixth.

Sergio Romo (1-0) earned the win with a perfect ninth.

Morton — 2-12 with a 7.57 ERA last season — missed a chance at his third win when San Francisco scored in the eighth. Morton lowered his ERA to 3.00 by allowing a run on four hits and three walks with six strikeouts.

Morton was coming off his only poor performance thus far this season — allowing six runs on 10 hits in five innings April 20 in Florida.

"To get back on track, it's good, but I just noticed I wasn't overly analytical," Morton said. "It was more simplifying what happened in the game in Florida and moving on.

"I think the mistake I made last year was dwelling on it and this and that and what happened. I really moved on. I just watched the video and learned from it and moved on."

Morton was lifted after Pablo Sandoval singled and Pat Burrell walked to lead off the seventh.

"Tonight I feel like I did a decent job, but I definitely could have put them away in the seventh today if I was just aggressive and made some pitches," Morton said. "But that's a good team, and they do what they do."

Chris Resop came on and got Cody Ross and Tejada to pop out to first baseman Overbay in foul territory, and he struck out pinch-hitter Mike Fontenot in an 11-pitch at-bat.

But the bullpen wasn't as good the following inning. Evan Meek allowed consecutive singles to start. After Joe Beimel got Aubrey Huff to pop out with runners at first and third, Posey lifted the sacrifice fly to left off of Jose Veras to score Ford.

The Pirates took a 2-1 lead with a two-out run in the sixth. Matt Diaz walked, stole second and scored on Overbay's single.

Giants starter Matt Cain was charged with two runs on four hits and a walk with six strikeouts in six innings.

Cain's only mistake was a 2-2 pitch in the second to Jones, who hit his team-high fourth home to right-center.

During the top of that inning, Andrew McCutchen saved a run when he covered plenty of ground in making a diving catch on a ball hit by Miguel Tejada into the right-center gap.

Notes: Giants LHP Barry Zito will see foot specialist Dr. Robert Anderson in Charlotte, N.C., on Wednesday. Zito, who sustained a mid-foot sprain April 16, had a cast removed from his right foot Sunday. ... The Pirates claimed OF Xavier Paul off waivers from the Los Angeles Dodgers on Tuesday but did not join the team yet.