SAN ANTONIO (AP) — Rudy Gay scored 18 points, Manu Ginobili had 17 and the San Antonio Spurs rallied late to beat the Sacramento Kings 98-85 on Monday night and clinch their 21st straight postseason appearance.

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.

Willie Cauley-Stein led Sacramento with 25 points and 10 rebounds. De’Aaron Fox added 21 points, and Buddy Hield had 17.

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 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 to gave the Spurs an 82-77 lead with 5:23 remaining.

LaMarcus Aldridge added 15 points and 14 rebounds but was 6 for 19 from the field.

Sacramento forced the rally with some hot shooting through three quarters.

Fox, who was shooting 30 percent from 3-point range for the season, made his first three 3s. He finished 3 for 5.

The Kings had 11 offensive rebounds through three quarters to the consternation of the Spurs’ fans, who groaned louder with each.

Sacramento shot 41 percent for the game.

TIP-INS

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.

UP NEXT

Kings: Host Houston on Wednesday night.

Spurs: Visit New Orleans on Wednesday night.