SAN FRANCISCO — St. Louis pitcher Luke Weaver flirted with perfection, had to overcome a little frustration, and settled for domination.
The Cardinals' offense was pretty good, too.
Weaver pitched two-hit ball over eight innings and St. Louis beat the San Francisco Giants 11-2 on Thursday night.
"He was making quality pitches at the top of the zone, down, changeup, breaking ball," Cardinals manager Mike Matheny said "Everything was spot on but he controlled the count with his heater and got a lot of early balls in the air. He was aggressive."
Weaver (5-7) faced two over the minimum and had seven strikeouts. The 24-year-old right-hander carried a perfect game into the sixth inning before giving up a single and Hanson's two-run homer. Weaver then bounced back to retire the final seven batters he faced.
Weaver didn't allow a hit until Gorkys Hernandez reached on an infield single with one out in the sixth. Gyorko made a diving stop on Hernandez's sharp liner near third base but the ball popped out of his right hand as he attempted to throw. Hanson followed with his homer.
"As soon as chopped it and Jedd had to dive, I had a feeling there was not going to be a chance to get him," Weaver said. "It would have had to have been an incredible slide jump-up throw and I still don't think he would have got him. It wasn't a big deal. I was pretty upset about the home run."
Jedd Gyorko had three hits including a home run and drove in five runs to spoil the return of Johnny Cueto after two months on the disabled list. Matt Carpenter and Harrison Bader also went deep while Yadier Molina singled three times.
The Cardinals had a season-high 18 hits — their most since getting 19 against the New York Mets on Aug. 24, 2016.
Alen Hanson homered for San Francisco. The Giants have scored five runs while losing four straight.
Cueto (3-1) was rocked in his long-awaited return from the 60-day disabled list. He gave up four runs in the first inning — one more than he had in 32 innings before going out with right elbow inflammation.
"Everything was fine except in the first inning when I was trying to be too fine," Cueto said. "Instead of just pitching, I was just trying to place the ball in the strike zone. I just have to continue working my way back to where I was."
WHAT'S THE COUNT?
San Francisco's Pablo Sandoval appeared to draw a two-out walk in the fifth and began trotting to first base before being called back after Matheny noticed there were only three balls. Two pitches later, Sandoval struck out to end a 12-pitch at-bat.
"I whistled and had the umpire stop for a second," Matheny said. "At about the same time, the replay called and then they figured it out on the field by the time we needed to come out of the dugout."
BABY BULL RETURNS
Orlando Cepeda attended the game for the first time since suffering cardiac arrest in February that left the Hall of Famer in critical condition. The Baby Bull was in the parking lot of a gym when he fell and hit his head during the incident. The 80-year-old is one of the most popular players in franchise history.
Cardinals: OF Dexter Fowler was reinstated from the paternity list before the game. ... Tyler O'Neill was placed on the 10-day disabled list with a left hamstring strain. ... RHP Matt Bowman (blister) was activated off the DL and optioned to Triple-A Memphis.
Giants: Manager Bruce Bochy said that RHP Jeff Samardzija will have fewer restrictions than Cueto when he returns from the disabled list to start Saturday's game. Samardzija hasn't pitched since May 29 because of shoulder tightness. ... INF Kelby Tomlinson was optioned to Triple-A Sacramento. ... RHP Roberto Gomez was released.
John Gant (2-2, 3.48 ERA) pitches for St. Louis on Friday. The right-hander has had mixed success since rejoining the rotation and allowed four runs in 5 1/3 against Atlanta in his most recent start. RHP Dereck Rodriguez (3-1 3.16) starts for San Francisco.