SAN FRANCISCO (AP) — Brett Wisely hit a tying RBI single with two outs in the ninth inning and Tyler Fitzgerald later scored the winning run on a wild pitch by Trevor Richards to give the San Francisco Giants a 4-3 victory over the Toronto Blue Jays on Tuesday night.

Richards (1-1) allowed a single to Patrick Bailey and walked Fitzgerald to bring in the tying and decisive runs in the ninth inning before Wisely’s single went between first and second base.

Fitzgerald wanted Richards to “please throw a ball of sand.”

“Anything that was in the dirt, I wanted to try,” said Fitzgerald, who will get a shot at shortstop. “I think I’ve talked it into existence.”

Manager Bob Melvin praised his players for their perseverance despite some tough at-bats in the ninth inning.

“You don’t get walkoffs like that very often, but in the last inning there was some relentlessness,” he said.

Yusei Kikuchi struck out a career-high 13 batters through the eighth inning, setting a personal best, and Ernie Clement’s three-run home run in the seventh put the Blue Jays in good position, denying Blake Snell a chance at his first win of the year.

Clement scored via Ryan Walker, who singled Danny Jansen with one out and doubled pinch-hitter Spencer Horwitz before Clement connected for a drive.

Snell, the reigning NL Cy Young Award winner who signed a two-year, $62 million contract in March, was unable to play on the injured list due to a groin injury that has sidelined him since June 3. He faced off against left-handed compatriot Kikuchi.

Kikuchi’s winless streak spanned five starts in which he is 0-3 since a win at Milwaukee on June 11. He retired the side in order in the second inning and had six Ks in his first three innings before Heliot Ramos — the Giants’ first homegrown All-Star since Chili Davis in 1986 — hit a home run in the fourth inning to put San Francisco ahead.

Kikuchi reached his 12th strikeout on July 23, 2021 against Oakland, marking his first double-digit strikeout since then.

Fitzgerald scored San Francisco’s first goal in the eighth inning.

Though still 0-3, Snell is encouraged by his progress, allowing just a single in the second inning to Davis Schneider, striking out three and walking three in a season-high five innings.

“Just finding a rhythm, trusting my stuff, trusting my body, getting better, just more confidence knowing that I can repeat, that’s the big thing,” Snell said.

The Blue Jays come across the San Francisco Bay to play the Giants for the first time since splitting games on May 14-15, 2019.

Toronto won two of three home games against the Giants in June 2023, giving up just five points.

TRAINER’S ROOM

Blue Jays: 3B Isiah Kiner-Falefa has begun testing his sprained left knee by playing some baseball and has done some light running and throwing. … RHP Yimi García (pitching elbow neuritis) suffered from a stiff neck and had his rehab game at Triple-A Buffalo postponed a day until Wednesday.

Giants: INFs Thairo Estrada and Wilmer Flores were also activated from the IL. Estrada — who started as the designated hitter — missed nine games with a sprained left wrist, while Flores also sat out nine games with tendonitis in his right knee. … INF Nick Ahmed was designated for assignment to free up roster space.

NEXT ONE

Former Oakland RHP Chris Bassitt (7-7, 3.43 ERA) now pitches in the Bay Area for the Blue Jays opposite Giants All-Star RHP Logan Webb (7-6, 3.09).

___

AP MLB: https://apnews.com/MLB

—-

Corrects Tyler Fitzgerald in the first paragraph.