DALLAS — Nemanja Bjelica could see another game slipping away from the Sacramento Kings with the ball in Luka Doncic’s hands.

But Doncic missed a tying attempt in the final seconds as the Kings withstood a furious rally and beat the Mavericks 110-106 on Sunday night.

With the memory of an overtime loss at San Antonio on Friday fresh in his mind, Bjelica matched his career best with 30 points.

Richaun Holmes rebounded Doncic’s attempt to tie the game with eight seconds left. Doncic had taken Sacramento’s Cory Joseph down the lane for the turnaround shot that clanged off the front of the rim. After the rebound, the Kings called a timeout. Bogdan Bogdanovic in-bounded to Bjelica for a layup that sealed the win.

“We all see how great Luka is,” Holmes said, “so you just try to do as much as you can to take him out his comfort zone.”

Sacramento ended a three-game losing streak. Dallas had won five straight and 10 of 11 before the loss.

“It feels good to win,” Bjelica said. “After we lost (Friday) against San Antonio, it’s a very important win for us.”

Buddy Hield scored 26 points, including five 3-pointers, for Sacramento. Former Maverick Harrison Barnes had 13, Holmes added 12 and a game-high nine rebounds. Bogdanovic and Trevor Ariza scored 10 each.

“(Bjelica’s) got the skill, the passing ability and shooting ability to really put pressure on the defence,” Kings coach Luke Walton said. “We’re constantly encouraging him to be more aggressive and tonight he was aggressive.”

The Mavericks’ high scorer was Tim Hardaway Jr. with 29 points. He kept the Mavs in the game by making a career-high nine of 12 3-pointers.

Doncic finished with 27 points, including 17 in the second half after Sacramento had sprinted to a 66-46 lead.

“We were very disappointed at our defence in the first half, and the second half was certainly way better,” Mavericks coach Rick Carlisle said. “But, gotta play the whole game. A disappointing loss.”

Hardaway said there was a message at halftime.

“Do you guys want to get smacked at home or do you want to get the crowd involved and give yourself a chance to win and keep this thing going? Everybody took it to heart and did just that,” Hardaway said.

For Dallas, Dorian Finney-Smith and Kristaps Porzingis each had 13 points.

Sacramento didn’t trail in the game and led by as many as 24 points.

The lead was 106-90 with 6:34 remaining. A 10-0 run capped by a 3-pointer by Doncic pulled the Mavericks within six points. The Kings’ lead dwindled to two points on a fadeaway by Porzingis with 34 seconds left.

Barnes missed a shot in the lane. Finney-Smith grabbed the rebound with 14 seconds left. After a timeout, Doncic got the ball.

“He’s in the paint with a small defender on him,” Hardaway said. “I’ll take my chances with him all day long.”

TIP-INS

Kings: PG Cory Joseph started despite experiencing pain in his lower back after playing 38 minutes on Friday night. ... F Marvin Bagley III remained out because of a fractured right thumb. He has not played since the Oct. 23 season opener. ... Kings not named Hield or Bjelica were 1 for 11 (9%) on 3-pointers in the first half.

Mavericks: G Delon Wright was out after leaving Saturday’s game with a strained groin muscle. “I feel like we dodged a bullet in terms of it being a serious thing,” coach Rick Carlisle said. “(The next game) Thursday hasn’t been ruled out. It’s going to be a day-to-day thing.” ... F/G Ryan Broekhoff was activated for the first time in eight games but did not play.

MAKE IT 3

Tim Hardaway Jr. made 75% of his 3-point attempts for Dallas. The rest of the Mavericks shot 1 for 13 (8%) in the first half but improved to 7 for 19 (37%) in the second.

Kings not named Hield or Bjelica were 1 for 11 (9%) on 3-pointers in the first half and improved to 3 for 10 (30%) in the second.

UP NEXT

Kings: Complete a four-game trip at Houston.

Mavericks: Play the designated “home” team Detroit Pistons in Mexico City on Thursday. Their only other regular-season games outside the U.S. or Canada were both at Mexico City, most recently in 2016-17 against Phoenix.

___

More AP NBA: https://apnews.com/NBA and https://twitter.com/AP_Sports