SAN FRANCISCO — When a dominant pitcher with a history of injuries appears to hit a wall late in the season for a contending team, it tends to raise alarm bells.

Michael Wacha silenced those concerns on Thursday night.

Wacha pitched six strong innings and Randal Grichuk hit a two-run homer as the St. Louis Cardinals beat the San Francisco Giants 5-2.

The Giants were without staff ace Madison Bumgarner, a late scratch with flu symptoms, as they lost for the sixth time in seven games.

Wacha (10-7) gave up one run, four hits and two walks as he bounced back from a tough stretch. In his three previous starts he was 0-3 with a 10.22 ERA.

“I think everybody’s hypersensitive and our antennas are up because he’s had issues in the past health-wise,” Cardinals manager Mike Matheny said. “It’s just a blip. He’s been good all year, his stuff’s been good all year. He just needs to trust the fact that you have a couple of games where the results aren’t there but the stuff looks right. Don’t put too much stock in that because everybody goes through that during the season.”

Tommy Pham was 3 for 4 with a double and two RBIs for St. Louis.

The Cardinals broke a scoreless tie in the top of the second when Grichuk hit a two-run homer off Giants starter Matt Cain (3-11).

Cain gave up two runs on seven hits in five innings after a disastrous outing in his last game. He gave eight runs in 2/3 of an inning against the Arizona Diamondbacks on Sunday.

“It was definitely nice to get back out there,” Cain said.

Grichuk’s 18th home run came on a 1-2 curveball Cain hung over the middle of the plate.

Five Cardinals relievers combined to allow one run over the final three innings with Seung Hwan Oh getting his 20th save.

The punchless Giants were coming off a 1-5 trip in which they scored 10 runs.

Brandon Crawford hit what initially was called a two-run home run in the bottom of the ninth that was overturned by a 4-minute, 8-second video review, with umpires apparently ruling that fans reached over the brick wall in right field.

Crawford had to go back on the field, sent to second base with a double that scored Buster Posey.

“They’re saying it was fan interference, they’re wrong,” Giants manager Bruce Bochy said. “Terrible overturn there. Shocked all of us. It’s a home run taken away from Craw.”

LOSING STREAK

Cain lost his career-high 10-decisions. He’s the first Giants pitcher to lose 10 straight since 1920 is Bill Lohrman (Aug. 4-Sept. 24, 1940). Cain’s streak is the longest in the majors since Shelby Miller lost 16 straight decisions (May 28-Sept. 27, 2015)

TRAINER’S ROOM

Cardinals: LHP Kevin Siegrist was designated for assignment after being activated from the disabled list with a left forearm injury. In a corresponding move RHP John Gant was called up from Triple-A Memphis.

Giants: OF Christian Slater will start a rehab assignment with Triple-A Sacramento on Friday and is expected to be activated after playing three or four games, manager Bruce Bochy said. The 24-year-old rookie has been on the disabled list since July 8 with strained right groin. .. Posey was back in the lineup after missing three games with a thumb injury.

UP NEXT

RHP Jack Flaherty will make his major league debut for the Cardinals on Friday. The 21-year-old prospect was a combined 14-4 with a 2.18 ERA in 25 starts this year at Double-A Springfield and Triple-A Memphis. San Francisco RHP Johnny Cueto (6-7, 4.59) will pitch for the first time since going on the disabled list with a flexor strain on July 15.


More AP baseball coverage: https://apnews.com/tag/MLBbaseball