Former Phillies manager Gabe Kapler won the National League Manager of the Year award on Tuesday night after guiding San Francisco to a franchise-best 107 victories in his second season with the Giants. He beat out Craig Counsell of the Milwaukee Brewers and Mike Shildt of the St. Louis Cardinals.

Kapler managed two seasons in Philadelphia before being fired. The Giants hired him after Bruce Bochy’s retirement. Kapler had both big shoes to fill — Bochy won three championships with San Francisco — and a struggling team to take over. When the Giants went 29-31 in the pandemic-shortened 2020 season, it was their fourth straight losing record.

Then, in a year when the star-laden Dodgers and Padres were supposed to compete for NL West supremacy, San Francisco surged to the best record in baseball. The Giants beat out the Dodgers by a game for the division crown, although they lost to Los Angeles in a tightly contested Division Series.

» READ MORE: Phillies could make unfortunate history by winning Cy Young and MVP awards

Kapler said he’s learned to become a good listener.

“I think I’ve really started to respect, understand and appreciate the feedback that I’m getting from players on a regular basis,” he said. “I really trust our players.”

As it turned out, Bochy was the person who announced Kapler’s award on the MLB Network show.

“I continue to feel like it’s impossible to fill Bruce Bochy’s shoes,” Kapler said.

Perhaps it is, but now Kapler has done something Bochy never did with the Giants — win Manager of the Year. Bochy did receive the award in 1996 when he was with the Padres.

Kapler is the first Giants manager to win since 2000, when Baker received the honor for the third time in an eight-year span.

Counsell finished second behind Kapler after leading the Brewers to the NL Central title. Shildt was third — a month after he was fired over what Cardinals president John Mozeliak described as philosophical differences.

» READ MORE: Bryce Harper, Zack Wheeler, and the Phillies’ flawed superstar formula | David Murphy

Brian Snitker of the World Series champion Braves and Dave Roberts of the Dodgers were the other managers to receive votes.

Kapler received 28 of the 30 first-place votes, which were cast before the playoffs began.

Tampa Bay’s Kevin Cash won the American League Manager of the Year Award for the second straight season. Only former Braves manager Bobby Cox has won the award in consecutive seasons.

Cox took the NL honor two years in a row with Atlanta in 2004-05 during his Hall of Fame career.

That’s the feat Cash has now matched. He led the low-payroll Rays to a second consecutive AL East crown this season. Tampa Bay (100-62) finished with the AL’s best record before losing to Boston in the Division Series.

Seattle’s Scott Servais finished second behind Cash in the voting by members of the Baseball Writers’ Association of America. Houston’s Dusty Baker was third.

Charlie Montoyo of the Blue Jays was fourth, followed by Alex Cora of the Red Sox, Tony La Russa of the White Sox and A.J. Hinch of the Tigers.

Cash received 19 of the 30 first-place votes.