SACRAMENTO, Calif. — Out of sync for most of the first three quarters, the San Antonio Spurs got a big lift from LaMarcus Aldridge down the stretch and an even bigger boost off the bench from Davis Bertans.

With star forward Kawhi Leonard sidelined indefinitely by a left shoulder tear, it was the perfect combination to keep San Antonio's three-year winning streak against Sacramento going.

Aldridge had 31 points and 12 rebounds, Bertans scored a career-high 28 and the Spurs came back from 13 down in the second half to beat the Kings 107-100 on Monday night.

"Guys (were) just being more active," Aldridge said. "In the first half we made a bunch of mistakes and in the second half we cleaned it up. Guys competed, played smarter and we ended up getting a win."

Aldridge provided his normal spark while dominating down low. He scored 21 points in the second half, including six over the final two minutes.

Bertans was just as crisp. The 25-year-old Latvian shot 11 of 15 and made a career-high six 3-pointers while teaming with Aldridge to lead the comeback.

"He's a wonderful shooter but he also understands how to play," Spurs coach Gregg Popovich said. "He really spreads the court for us. He was a big factor tonight."

Patty Mills added 14 points and five assists, and Bryn Forbes scored 12 to help the Spurs to their 12th consecutive win over the Kings.

But it wasn't easy.

One night after losing to Portland 111-110, San Antonio was outplayed and outhustled in the first half and was still down 95-90 with four minutes remaining.

Kyle Anderson made one of two free throws and Bertans hit back-to-back 3s to put the Spurs up 97-95. After Willie Cauley-Stein's free throw, Aldridge tipped in Mills' miss and then converted a three-point play as San Antonio closed on a 10-3 run.

Mills punctuated the win with a steal at midcourt that led to an uncontested layup. That left the Sacramento crowd stunned and silent after the Kings had led by as many as 14.

"Once you get out there you forget about tired legs," Bertans said. "Coming off that loss in Portland it was very important to just keep pounding the rock until the end."

Cauley-Stein had 22 points and nine rebounds for the Kings. De'Aaron Fox added 11 points and 10 assists, and Bogdan Bogdanovic and Garrett Temple scored 16 apiece.

The Spurs have not lost to the Kings since Nov. 15, 2014, and have won seven straight in Sacramento.

The Kings have dropped six of eight overall.

"It's a tough one to swallow," Fox said. "It was just a few turnovers and then defensively we couldn't get a stop (late)."

Both teams traded buckets early before Sacramento built a double-digit lead before halftime.

Zach Randolph, who sat out Sunday's win over Denver because of oral surgery, made a 3-pointer to start an 11-2 run. Fox made a layup and Buddy Hield followed with a 3 after Aldridge turned the ball over in the backcourt.

Bogdanovich hit his second 3 of the second quarter to put the Kings up by 14 before the Spurs closed to 56-46 at halftime.

"Guys were playing hard but we were making fatigue mistakes, throwing the ball out of bounds, throwing it to the other team," Aldridge said.

Aldridge scored 11 of San Antonio's first 13 points in the third quarter, but it was Bertans who kept the Spurs close with his career night. He had two 3s in the third and two in the fourth to fuel the comeback.

"That's what we need from him," Aldridge said. "When he shoots with confidence and he plays with a determination, he's a big-time player. When he's indecisive and he's trying to overthink it, that's when he's not as good as he can be. Today he played with confidence and took the shots that he had."

TIP-INS

Spurs: Manu Ginobili was given the night off after scoring a season-high 26 points in the loss to Portland on Sunday. ... Danny Green (groin tightness) missed his fourth consecutive game.

Kings: Cauley-Stein had 10 points and five rebounds in the first quarter. ... George Hill missed his second straight game for personal reasons.

UP NEXT

Spurs: At the Los Angeles Lakers on Thursday.

Kings: At the Lakers on Tuesday.