SAN FRANCISCO — Kirby Yates is the surfer baseball nearly forgot.

Not a single team bothered to draft him 10 years ago. And the next decade was spent sold, released, purchased, waived and traded. He spent parts of nine years in the minor leagues.

Now, at 32, he is on the verge of climbing to the mountaintop of baseball accolades.

Yates is three weeks away from representing the San Diego Padres at the All-Star Game.

“If it happens, it means I’ve come full circle,’’ Yates told USA TODAY Sports. “I’ve failed a lot. I mean, I’ve been failing for years. And to make the All-Star Game, it would be unbelievable. This game is funny. It’s crazy. It’s weird.’’

Who would ever have imagined that Yates, who was shuffled and discarded like a used deck of cards from five different organizations in three years, would have the loftiest statistics by any closer in baseball?

Yates has been virtually perfect this season, leading the major leagues with 23 saves in 23 opportunities, with a league-leading 0.96 ERA, yielding a .137 batting average against right-handed hitters, to go along with two scoreless streaks of 10 or more innings.

In an organization that had three Hall of Fame closers (Rollie Fingers, Goose Gossage and Trevor Hoffman) a Cy Young closer (Mark Davis), Yates is saving games at a rate never before seen in San Diego.

PLAYOFFS: Some division races are already over

PADDACK: NL ROY candidate sent to Class A

He is the first Padres’ pitcher to have at least 20 saves before June and is just three saves shy of the franchise record for saves before the All-Star break, trailing Heath Bell in 2011.

“It’s been neat to be compared to some of the great closers this organization has had,’’ Yates said, “but I don’t think people should slot me into their category. I have a lot to prove before being compared to them. Come on, let me pitch a full season first, then you can say what you want.’’

Yates is still trying to grasp his accomplishments while knowing that of all the players who make this year’s All-Star team, no one might appreciate it more than him.

“I don’t take any of this for granted,’’ Yates says, “knowing just how hard it was for me to even get to the big leagues, and then bouncing around like I did. And now this.’’

Yates, born and raised in Lihue, Hawaii, visited the mainland only once in his life before his senior year. He had only two collegiate offers to play beyond high school, choosing Yavapai Community College in Prescott, Arizona, over Central Arizona College.

He missed two years in college recovering from Tommy John surgery, and when the 2009 amateur draft came and went, with 1,521 players selected in 50 rounds, Yates’ name was never called.

Tyler Yates, 41, who pitched five years in the major leagues and is now a police officer back home in Kauai, vividly remembers that telephone call from his little brother, who suddenly was about to quit.

“As soon as the draft was over,’’ Tyler Yates said, “he called me and said, 'Dude, I didn’t even get drafted. No one wanted me. A scout just called, but I don’t even know if I want to play baseball anymore.’

“I told him, 'You waited your whole life for this. You better take it. Come on, you can’t quit now.’ ’’

Yates listened to his brother, signed a week after the draft with the Tampa Bay Rays and reached the big leagues five years later. He was sent to Cleveland for cash considerations after the 2015 season. Six weeks later, he was traded to the New York Yankees. He pitched 41 games in 2016 for the Yankees, going 2-1 with a 5.23 ERA, and suddenly started to believe he could have an actual future in the major leagues.

He decided to fully dedicate himself to the game, moved from Hawaii to Chandler, Arizona, where he could not only take advantage of the training facilities but also would no longer be tempted to blow off his workouts for a day of surfing with a beer cooler nearby.

“I’d go surfing all of the time; I loved my life,’’ Yates said, “maybe a little too much. I had to be more disciplined and take advantage of this gift. It was one of those things that you work your whole life for this, so why wouldn’t I put forth more effort and get myself dialed in.’’

Yates, who was relying solely on his fastball and slider, started experimenting with a split-finger pitch that winter. He never got a chance to use it with the Yankees, or even thank Masahiro Tanaka for helping teach him the pitch. He was claimed off waivers again by the Los Angeles Angels. He thought the pitch was coming along fine in spring training and his six minor league appearances with Class AAA Salt Lake, but after being called up by the Angels, his tenure lasted a mere inning.

Next stop, San Diego, with the Padres claiming him on April 26, 2017.

In two years, he has morphed from a journeyman to a middle reliever to a premier setup man to one of the most dependable closers in the game.

“I always knew he could do this,’’ Tyler Yates says. “It was always there. But he just had to believe it.’’

Yates had no choice when the Padres traded relievers Brad Hand and Adam Cimber two days after the 2018 All-Star Game for catching prospect Francisco Mejia. This was the opportunity that was going to make or break him.

“I hated the way I got the job because Brad Hand was my closest friend on the team,’’ Yates said, “but I also felt I was more physically and mentally prepared than anything I could possibly be for in my life. I never panicked. I was never scared. It’s not like I wanted to fail, but I wasn’t afraid to fail, you know what I mean?

“It’s like, it can’t be anything worse than I’ve already been through. I figured if that’s as bad as it’s going to get, no matter what I do as a closer, it can’t ever be that bad again.’’

Well, Yates hasn’t had to find out, converting on 35 of his 36 save opportunities since becoming the Padres’ closer, yielding just 16 hits while striking out 48 batters in 28 innings this season.

It’s not as if he lights up the radar gun with his 93-94 mph fastball, but hitters are kept completely off-balance with his 86-mph split-finger, which he throws nearly half of the time.

Oh, and you want to talk about preparation?

He’s one of the first players to arrive to the Padres’ clubhouse, spending hours poring over scouting information, studying videotape and analyzing the strengths and weaknesses of every player he might potentially face in that day's game.

“He doesn’t just take the ball, chuck it and hope things happen,’’ Padres pitching coach Darren Balsley says, “he’s 100% prepared for each and every game we play. He’s learned how to pitch his way. He knows where his outs come. And he has so much confidence now.

“You hear people say that with a story like Kirby’s and overcoming so many obstacles, he’s proving a lot of people wrong now.

“No, he’s just proving himself right.’’

Really, the only obstacle in Yates' path now is that he might be, well, too good. He is tantalizing to every contender needing bullpen help before the July 31 trade deadline, and with the Padres falling out of contention, they suddenly have an awfully attractive trade piece.

“I don’t want to go; I really don’t,’’ Yates said. “I love it here. I feel we’ve got something brewing here and will be in contention of years. And I’m so comfortable here. It just fits. I love the lifestyle. I love everything about it.’’

San Diego might not be Kauai, but it’s the closest thing in the major leagues, playing in the perfect climate, and just off the Pacific beach. His dad, Gary, got to see him pitch a week ago in San Diego, and he knows if he’s traded back east, it might be too far for his parents. They never once got to see him pitch for the Yankees because of the 12 hours it would take on even a direct flight to New York.

“It’s just too far for my parents,’’ Yates said, “that’s why San Diego is perfect. I know it’s part of the business, but I’d just hate to leave here.’’

Considering Yates’ success and popularity in the clubhouse, veteran second baseman Ian Kinsler and his teammates say, the feeling is completely mutual.

“We’re thrilled that teams like him,’’ Padres manager Andy Green said. “But we love him. We want him here. We want him closing out games for years to come for us.’’

Yates, who’s a free agent after the 2020 season, refuses to stress out about it, knowing it’s taboo in his Hawaiian culture, but certainly sees the irony.

Ten years ago, almost to the exact day, no team in baseball wanted him.

Today, who doesn’t?

“Crazy game, huh?’’ said Yates. “Who would have believed it?’’