PITTSBURGH -- Matt Cain tried to put it out of his mind that Thursday marked the one-year anniversary of his perfect game.
"A lot of people were talking about it, though," the San Francisco Giants right-hander said with a smile. "So, it was hard to completely tune it out. But I wasn't thinking about throwing another one."
Cain did not pitch a perfecto like he did against the Houston Astros last June 13, but he did combine with three relievers on a three-hit shutout as the Giants routed the Pittsburgh Pirates 10-0 at PNC Park to salvage the final game of a three-game series.
Cain took a no-hitter into the fifth inning before Garrett Jones broke it up with a leadoff single. It was just one of two hits the Pirates managed off Cain in 6 2/3 innings as he walked two and struck out three.
"A no-hitter did cross my mind because he had great stuff," San Francisco manager Bruce Bochy said. "He certainly made a great start and took us deep into the game. He had good command of all his pitches. He's in a good place right now with his delivery and command."
Cain (5-3) is 5-1 in his last eight starts and has allowed two runs or fewer in six of those outings.
"I am throwing the ball a whole lot better than I was earlier in the season," Cain said. "I'm trying to eliminate that big inning. I had done a good job of that for some years now, but I've kind of had trouble with it this year. It's a matter of putting it in the past and getting guys out."
The Pirates had no big innings again Cain or relievers Javier Lopez, Jean Machi and Jeremy Affeldt, who finished the Giants' seventh shutout of the season. The Pirates were blanked for the sixth time.
The Giants had 17 hits despite being without the first three hitters in their batting order. Center fielder Angel Pagan and third baseman Pablo Sandoval are on the disabled list, and second baseman Marco Scutaro missed his second straight game with tendon damage in his lefty pinky.
Gregor Blanco and Buster Posey each had three hits and two RBIs to lead the way.
Joaquin Arias also had three of San Francisco's 17 hits, and Hunter Pence had two hits, including a three-run home run in a five-run sixth inning that put the game away. Nick Noonan also had a pair of hits.
"It's a great sign," said Bochy, whose team scored eight runs in a loss Wednesday night while also missing their top three hitters. "We're missing three big bats. You hope guys pick it up, and they have the last couple of games. Blanco had a big game. Really, a lot of guys had big games. It's a great opportunity for the guys who are getting a chance to play to show they can help us and make us a deeper club."
Pittsburgh's Charlie Morton (0-1) was touched for four runs -- two earned -- and seven hits in his first major-league start since May 29, 2012. Morton underwent Tommy John reconstructive elbow surgery last June 14 and walked one and struck out five in returning to a major-league mound 364 days following the operation.
"The game seemed faster," Morton said. "Everything speeded up at the beginning until I got adjusted. Overall, I thought it was decent. I got some ground balls, got some strikeouts, but I didn't get the results I wanted."
However, manager Clint Hurdle saw enough good signs from Morton to be optimistic.
"I think he did some things well, and there are some areas he'll have to improve on," Hurdle said. "I think there was a little nervousness there. I also think if we defend better, he might get out of there with two runs in five innings, which would have been a good outing."
San Francisco (34-31) won for just the fourth time in its last 14 road games, and Pittsburgh (39-27) lost for just the second time in six games overall. The Pirates also missed a chance to sweep a series from the Giants for the first time since 2008.
The Giants broke the game open with the big sixth inning against reliever Mike Zagurski. Blanco and Posey hit RBI singles before Pence's 11th homer made it 9-0.
The Giants added another run in the ninth on a throwing error by Pirates center fielder Andrew McCutchen.
The Giants struck quickly against Morton, scoring a run before he got an out. Blanco walked, Brandon Crawford was hit by a pitch and Posey hit an RBI single.
Blanco singled home a run in the second to take a 2-0 lead.
San Francisco made it 4-0 in the fifth. Crawford scored on an obstruction call when he collided with Pirates third baseman Pedro Alvarez while in a rundown between third and home. Andres Torres then hit a sacrifice fly.
NOTES: Pittsburgh placed RHP A.J. Burnett on the 15-day disabled list with a strained right calf to open a spot on the 25-man roster for Morton. The Pirates released RHP Jose Contreras, who was on the disabled list with a lower back strain, to free up a 40-man roster spot. ... San Francisco made a flurry of roster moves, designating RHP Ramon Ramirez for assignment, recalling RHP Jake Dunning and C Hector Sanchez from Triple-A Fresno and optioning 1B Brett Pill to Fresno. ... Scutaro missed his second straight game with the tendon damage in his left pinky. He also is expected to sit out the three-game series at Atlanta that begins Friday night. ... Pirates LF Starling Marte was a late scratch because of a strained left ribcage, which he suffered Wednesday night while going 4-for-4 with four runs and two stolen bases in a 12-8 win over the Giants. Alex Presley took Marte's place in left field and as the leadoff hitter. ... Pagan ran Thursday for the first time since going on the disabled list May 28 with a strained right hamstring. The Giants are hopeful Pagan, their leadoff hitter, could be activated next week. ... Giants LHP Madison Bumgarner (5-4, 3.58) will face the Braves RHP Kris Medlen (3-6, 2.87) on Friday night. ... The Pirates open a three-game home series with the Los Angeles Dodgers on Friday night, with LHP Jeff Locke (5-1, 2.39) opposing RHP Stephen Fife (1-1, 3.78).