SAN DIEGO — It didn’t take long for Camilo Doval to bottom out.

The 24-year-old rookie was eight games into his major league career when he walked off the mound at Coors Field hanging his head. Doval entered a May 4 game against the Rockies with a chance to earn his first major league save and instead watched Colorado right fielder Charlie Blackmon crush a walk-off home run in an 8-6 Giants loss.

“I asked him, ‘How important was the experience that you had in Colorado, getting beat up a little bit, subsequently getting sent down, to your courage in that moment?’” manager Gabe Kapler said. “And he said it was everything.”

That moment came at Petco Park Wednesday night after the right-hander entered a bases-loaded, no-out situation trying to protect a 3-1 Giants lead. The conversation Kapler described took place in the dugout on the third base side of the field after Doval recorded three huge outs to escape the jam.

“I think Doval was the pivotal moment in the game,” catcher Buster Posey said following an 8-6 Giants win.

With the Giants on the ropes, Doval punched back by firing three straight sliders to San Diego star Manny Machado, who struck out swinging. He then induced a 6-4-3 double play from left fielder Tommy Pham to end the inning, which earned him more than just praise from 37-year-old starter Scott Kazmir.

“I owe him dinner,” Kazmir said.

A night after Doval touched 102.5 miles per hour on the radar gun with the fastest pitch thrown by a Giant in more than a decade, he once again proved that he belongs in a high-leverage role by cutting through the heart of the Padres’ lineup.

Like so many other talented prospects, Doval lost nearly an entire year of development in 2020 due to the cancelation of the minor league season following the start of the coronavirus pandemic. The Dominican Republic native had never pitched above High-A ball, but the Giants chose to protect him from the Rule 5 Draft and add Doval to their 40-man roster last winter anyway after he flashed premium velocity during fall instructional league games in Arizona.

Giants president of baseball operations Farhan Zaidi doesn’t like to waste 40-man roster spots on players who can’t contribute to a major league club, so it wasn’t all that surprising to see Doval thrust into the Giants bullpen in the middle of April. A handful of appearances went well, but a few didn’t, including the disaster in Colorado that forced Doval to reevaluate his priorities on the mound.

“I have confidence in what I have to do here in the big leagues to help the team out,” Doval said pregame on Wednesday. “That experience early in the year has really helped out for a second go-around here this time of year.”

Early in the season, a pitcher with a 100-plus-mile per hour fastball lost conviction in the offering and relied too heavily on his slider to be effective. Since returning to the big leagues with 1 1/3 innings of scoreless ball in the Giants’ 6-4 win over the Dodgers on Sept. 5, Doval has shown no fear throwing either of his pitches in the strike zone and has even seen an uptick in his velocity over the course of the month.

“What’s what’s really encouraging is even with the nasty stuff, even with the high velo, he’s able to fill up the strike zone,” Kapler said.

Four months after having his confidence shaken, Doval was seen in the dugout on Wednesday night with assistant pitching coach J.P. Martinez putting two fingers on the pitcher’s neck as he pretended to check his pulse.

“He has ice in his veins,” Kazmir said.

With closer Jake McGee on the 10-day injured list with a right oblique strain and set-up man Tyler Rogers struggling in an interim ninth-inning role, it’s possible a Giants club that’s seen Doval record nine consecutive scoreless outings may audition the rookie in another save situation sometime soon.

Perhaps it will come this weekend when the Giants visit Coors Field, the stadium where Doval’s rookie year hit a harsh but valuable turning point.