SAN FRANCISCO — Matt Cain and his wife, Chelsea, returned to the field an hour and a half later for a few more perfect memories. They snapped photos on the mound, posing with the workers who tore it down so the dirt could be sent to the Hall of Fame.
Then they walked away hand in hand, stopping in left field for an embrace and long kiss.
The Giants franchise waited a long time for a perfect game, and Cain became the one to finally do it. Not Hall of Famers Christy Mathewson or Juan Marichal or Gaylord Perry before him.
Fittingly, Cain is the longest-tenured Giant these days.
His perfecto is the 22nd in major league history. He struck out a career-high 14 and got help from two spectacular catches to beat the Houston Astros 10-0 on Wednesday night.
‘‘I’ve never had that much excitement in every pitch, every swing,’’ Cain said.
His 125-pitch gem for San Francisco featured a pair of great plays by his corner outfielders. He got pinch-hitter Jason Castro on a grounder to third for his 27th and final out with the sellout crowd of 42,298 roaring.
‘‘This is incredible right now,’’ Cain said. ‘‘It was unbelievable. The guys did a great job making it, in a way, kind of relaxing, because they were able to get on the board early.’’
It was the fifth no-hitter in the majors already this season and second perfect game.
Another Year of the Pitcher? You bet.
In the very ballpark where Barry Bonds made home run history five summers ago, Cain produced the signature moment for pitchers. It was the 14th no-hitter in club history — Mathewson pitched Nos. 2 and 3 in 1901 and ‘05, and fellow Hall of Famers Carl Hubbell, Marichal and Perry had one apiece.
After Cain’s career outing was in the books, the center field scoreboard showed an image of him pitching with the message: ‘‘MATT CAIN First Perfect Game in Giants Franchise History.’’
Left fielder Melky Cabrera chased down Chris Snyder’s one-out flyball in the sixth, scurrying back to make a leaping catch at the wall. Cain raised both arms and slapped his glove in delight when Cabrera made the play.
Then, right fielder Gregor Blanco ran into deep right-center to make a diving catch on the warning track and rob Jordan Schafer for the first out of the seventh. The 27-year-old pitcher hugged Blanco in the dugout after the inning.
‘‘Those were unbelievable catches,’’ Cain said. ‘‘I mean that right there, that changes the whole thing.’’
Philip Humber of the Chicago White Sox tossed the majors’ last perfect game at Seattle on April 21. This is the second time in three years there have been two perfect games in the same season — before that, the only other time it happened was in 1880.
Cain (8-2) won his career-best seventh straight start and accomplished a feat last done in the Bay Area by A’s lefty Dallas Braden on Mother’s Day 2010.
Braden tweeted congratulations, saying, ‘‘What a beautiful game.’’
Cain’s day had already been a success. He was granted permission from general manager Brian Sabean to hit one drive into McCovey Cove alongside U.S. Open golfer Dustin Johnson before the game to show off one of his other favorite pastimes.
Not since 1917 have there been five no-hitters in a season by mid-June. The only year that came close was 1990, when Fernando Valenzuela and Dave Stewart each pitched no-hitters on June 29 — the fourth and fifth of the season.
This year, Johan Santana tossed the New York Mets’ first no-hitter on June 1 and six Seattle pitchers shut down the Los Angeles Dodgers last Friday. Jered Weaver had one for the Los Angeles Angels on May 2.
The Astros were no-hit for the fifth time and first since Carlos Zambrano did so for the Cubs on Sept. 14, 2008.
Giants manager Bruce Bochy had a reliever warming up out of view in the batting cage area — but Cain didn’t know it. He didn’t need to.
‘‘He’s been close to throwing a no-hitter,’’ Bochy said. ‘‘To get it makes it that much more special because he’s been with the Giants his entire career, he’s the senior guy on the staff.’’
The Giants made a big commitment to Cain this spring, locking him up for a long haul — and he showed exactly why Sabean has vowed to keep his talented pitchers. In a week when the city’s attention turned to golf and the U.S. Open, Cain delivered his most impressive gem yet in his 216th career start.
The 125 pitches were the most ever thrown in a perfect game. The Astros had never gone 27 up, 27 down.
The two-time All-Star, who had endured a lack of run support, was rewarded with a new $127.5 million, six-year contract in early April before the season started. This certainly meant as much or more to the homegrown pitcher.
Cain threw 86 pitches for strikes, faced just four full counts and still clocked 90 mph in the ninth. Cain followed up Madison Bumgarner’s 12-strikeout gem in Tuesday night’s 6-3 win.
‘‘I know when I haven’t given up a hit, I’m always conscious of it,’’ Cain said. ‘‘Probably the first time through the lineup I felt like I had good stuff. The first time through the lineup I felt like something could happen.’’
Something special, all right. It was the first no-hitter by San Francisco since departed left-hander Jonathan Sanchez did it July 10, 2009, against the Padres at AT&T Park.
The Astros were no-hit by the Giants for the second time. Marichal did it on June 15, 1963.
Even Cain thought Snyder had enough to clear the fences in the sixth. That’s when the Astros realized it might be a long night.
Blanco said of his catch: ‘‘I didn’t think I was going to make it, but I did,’’
Ted Barrett became the first umpire to work behind the plate for two perfect games. He also worked David Cone’s 1999 perfecto at Yankee Stadium.
‘‘He could put the ball anywhere he wanted,’’ Barrett said. ‘‘He knew where he wanted to throw it, and he threw it there. Cone had the big, big backdoor breaking ball. It was against the Expos and I don’t think they had faced him before. They were a little bit baffled by Cone’s stuff.’’
Cain pivoted on the mound to watch third baseman Joaquin Arias make a long throw for the final out, then the celebration began. First baseman Brandon Belt caught the last throw, tucked the ball in his back pocket for safekeeping and rushed to the mound.
Catcher Buster Posey ran out to Cain, who raised his arm. His teammates jumped the dugout rail as the final out was made, a moment reminiscent of that improbable World Series championship in 2010 at Texas.
‘‘I can’t thank Buster enough,’’ Cain said. ‘‘I didn’t even question once what he was calling.’’
Chelsea fought tears when shown in the stands as the celebration began, then made her way to the dugout for a congratulatory hug and kiss.
Cain had come close already this season — not once, but twice. In his second start of the year, in the team’s home opener April 13, he one-hit the Pirates in a 5-0 win, then allowed only two hits over nine innings in the Giants’ 11-inning, 1-0 win over Cliff Lee and the Phillies.
‘‘I’ve had some opportunities in the past. There’s really nothing like it,’’ Cain said.
Cabrera, Belt and Blanco each hit two-run homers and the Giants produced an offensive outburst rarely seen at home this season and rarely seen when Cain has pitched.
On this night, he threw nine of his initial 11 pitches for strikes, commanding his repertoire with a dazzling fastball.
NOTES: Blanco called it the best catch of his career. ‘‘I still don’t know how he caught that ball,’’ Bochy said. ... Of the 22 perfect games, half have come in the last 24 years. Roy Halladay and Braden each threw one two seasons ago. ... Castro, who grew up near San Francisco and went to Stanford, had caused Cain problems in the past. Castro hit his first major league homer off Cain in 2010.