The crack of the bat coaxed a collective gasp from the AT&T Park crowd, which in turn immediately erupted when a diving Gregor Blanco made a remarkable catch to keep Cain's run at an historic gem alive.
"I just put my head down and looked up and saw Blanco -- he was relentless," manager Bruce Bochy said.
Eight outs later, Cain notched the 22nd perfect game in Major League history and the first ever for the Giants in San Francisco's 10-0 win over Houston.
"I think when he caught that ball, Matty knew something special was happening," Bochy said.
Several of Blanco's teammates said to him afterward that it was one of the greatest plays they had ever seen, and Blanco said he couldn't disagree, saying it was the best play he had ever made.
"For me, it was," Blanco said. "It was a big deal right there in that moment. We only try to bring confidence to these guys to do what [Cain] did today."
"He made one of the most spectacular plays that I had ever seen, considering the circumstances," Brandon Belt said. "It's probably one of the best catches in baseball history."
The fly ball was closer to center field than right field, and Blanco had been shading toward center after a tip from his coaches about Schafer.
"Coaches told me that with Schafer to play a little more to the gap," Blanco said. "Everybody kept telling me, 'What are you doing playing right there?' I was just playing a little bit to the gap, and I guess I used my legs to try and catch that ball."
"It looked like he was playing center field where he caught the ball," Bochy said. "I don't think I've ever seen a right fielder catch a ball there. He had moved over a bit."
Blanco's catch was one of several big defensive plays behind Cain, including another impressive catch in the outfield on a long fly ball.
In the sixth, Astros catcher Chris Snyder smacked a pitch that looked to be headed toward the left-field seats.
And from Angel Pagan's view from center field, the ball did leave the field -- only to get guided back to a sprinting Melky Cabrera by a gust of wind.
"I had the best view, and that ball went out," Angel Pagan said. "It went out, and then it banana-cut and then came back."
"It was just one of those things, I asked [Snyder] at home plate and he said, 'I got the whole thing,'" Pagan said. "I told him that ball was 10 rows out, and then it came back and Melky made a play. It was something I've never seen."
Cain had a similar take on the Snyder fly ball.
"I thought it was a home run; I think we all did," Cain said. "I have no idea why that ball stayed in the park."
Watching Cabrera make the catch, Blanco said, kept him on his toes in right field in case he would have to make a perfect game-saving catch.
"Melky got that great catch in left field, and I said to myself, 'If you get a ball like that one over there, you better catch it," Blanco said. "And I did, and it feels really good."
Jay Lee is an associate reporter for MLB.com. This story was not subject to the approval of Major League Baseball or its clubs.