SAN ANTONIO (AP) -- The Spurs seemed like a perfect free-agent destination as Rudy Gay searched for a guaranteed playoff berth after just one postseason appearance in 11 previous seasons.
That assurance was eroded by injuries this season, but Gay made sure two decades of success didn't come to an end in his first year in San Antonio.
Gay scored 18 points, Manu Ginobili had 17 and the Spurs rallied late to beat the Sacramento Kings 98-85 on Monday night and clinch their 21st straight postseason appearance.
''It feels good, it feels great actually,'' Gay said. ''This is what the regular season is for, to get to where we are now. This is a good feeling, something that I'm anxious for something I've been looking forward to for a long time. It'll be fun.''
San Antonio is fifth in the Western Conference despite only having star forward Kawhi Leonard available for nine games this season. The Spurs still have a slim chance of finishing fourth and earning home-court advantage in the first round with one game remaining. For now, they are just happy to make the playoffs.
''For moments we felt like the worst team in the NBA,'' Ginobili said, ''but we still managed to go close to 50 games and make it to the payoffs in a conference that is tough and talented and young and athletics. So, we managed to compete.''
Sacramento, which was eliminated from the postseason on March 11, led by 14 points before being outscored 38-19 in the fourth quarter.
Reserves Gay, Ginobili and Bryn Forbes combined for 25 points in the fourth quarter. Forbes finished with 11 points total.
''It's tough when Rudy gets going, everything goes in,'' said Willie Cauley-Stein, who finished with 25 points and 10 rebounds.
Gay had eight points, five rebounds, an assist and a block in the fourth quarter.
San Antonio outscored Sacramento 50-25 after Gay entered the game with 6:38 remaining in the third quarter.
''The way I was growing up, you learn you never have anything given to you, so you've got to go get it on your own,'' Gay said.
Forbes' fast-break layup off a steal by Kyle Anderson gave San Antonio its first advantage at 68-67 with 10:21 remaining. Sacramento went back ahead seconds later when Buddy Hield hit a 3-pointer, and the lead changed three times after that before Ginobili and Gay gave the Spurs' the edge for good.
Gay and Ginobili had thunderous dunks in the final five minutes that helped San Antonio maintain small leads. Gay also had a 3-point play off a runner he tossed in and ripped the ball from Cauley-Stein while blocking the 7-footers shot.
A 3-pointer by Forbes and a layup by Ginobili 30 seconds later gave the Spurs an 82-77 lead with 5:23 remaining.
''He did an amazing job,'' Ginobili said of Forbes. ''Not only to make shots it's easy to see the 3s or the two big shots he got, but he played very solid defense, he was a pest chasing them around. We really changed the game when he was on the court.''
LaMarcus Aldridge added 15 points and 14 rebounds but was 6 for 19 from the field.
De'Aaron Fox added 21 points, and Hield had 17 for the Kings.
Kings: Fox's season-high for 3-pointers is six against the Spurs on Jan. 28. ... The Kings' last victory over the Spurs was Nov. 15, 2014 in Sacramento and their last win in San Antonio was Jan. 20, 2012. ... Sacramento was without Iman Shumpert (left knee surgery), Garrett Temple (sprained left ankle), Skal Labissiere (sprained left ankle), Frank Mason (sore left heel) and Harry Giles (knee rehabilitation).
Spurs: San Antonio's streak of playoff appearances is the longest active streak in the four major professional sports. The Pittsburgh Penguins of the NHL are second with 12 followed by the NFL's New England Patriots with nine and the Los Angeles Dodgers in the MLB with five. ... Aldridge had his 27th double-double of the season, the most he has had in three seasons with the Spurs. The 12-year veteran had 26 double-doubles in his inaugural season in San Antonio and 18 last season.
The Spurs are having to adjust to a new reality after being a championship contender for the better part of the last two decades.
Injuries to Leonard, Gay, Anderson, Ginobili, Tony Parker and others almost cost San Antonio a playoff berth.
''Sometimes you've got to adjust your goals relative to your potential, the way you've been playing, the way the season is going,'' Ginobili said. ''So, we've got to be realistic. Maybe we're not the favorites this year or maybe it wasn't going to be a 60-win season like the previous ones. After what happened in February and early March, we had to shift our expectations. We mentioned in many times, the goal was to make it to the playoffs. Once we clinched, then we may think about standings, but the way the West is this year, it's crazy. Everything is so clogged so tight that at this point, we're happy to have clinched.''
Kings: Host Houston on Wednesday night.
Spurs: Visit New Orleans on Wednesday night.