DALLAS (AP) – Luka Doncic scored 10 of his game-high 25 points in the fourth quarter as the Dallas Mavericks beat the San Antonio Spurs 104-99 on Thursday night, after some wild swings in the first half before turning into a back-and-forth game.

The Mavericks finally went ahead to stay on Doncic’s alley-oop pass to Dwight Powell for the finish that made it 86-84 with 8:33 left. They stretched that to an 11-point gap by the time Doncic hit a step-back 3-pointer about 3 1/2 minutes later.

READ MORE: Texas Ban On Mask Mandates In Public Schools Is Back In Place

“I was way more aggressive in the fourth than I was in the first three quarters,” Doncic said. “That’s what I’ve gotta do the whole game.”

Jalen Brunson added 19 points for the Mavs, while Dorian Finney-Smith had 14 and Maxi Kleber 12. They all had at least three 3-pointers, the same as Doncic. Kleber also had 10 rebounds and six blocked shots.

Dejounte Murray (23 points and 10 rebounds) and Jakob Poeltl (14 points and 13 rebounds) had double-doubles for the Spurs. Murray also had a game-high eight assists. Bryn Forbes had 15 points on five 3s. Lonnie Walker IV, starting in place of the injured Doug McDermott, scored 14.

An early 20-point lead wasn’t enough for the Spurs, an inexperienced group of players that coach Gregg Popovich said continues to compete night after night.

“But the experience and the mistakes we might make in shot selection or transition defense, or whatever, it adds up, because we’re not that potent an offensive team where we can just score at will,” Popovich said. “We have to be more perfect in real fundamental ways because we’re not going to have that guy to give the ball to and say go score now. That’s not who we are. We’ve got to do everything together, and they’re trying their best to do that and they’ll get better at it, and just got to stick with it.”

San Antonio jumped out to a 25-5 lead to start the game, and the Mavericks didn’t have a field goal until Doncic scored with 6:33 left in the first quarter to get within 18-3.

“We were just a little slow to start the game, and it’s been like that since the season started,” Mavericks coach Jason Kidd said.

READ MORE: Texas Is Officially Tesla's New Home

Doncic was a bit more harsh in his assessment.

“It was just a bad start, a really bad one,” he said. “No energy, everyone was sloppy. It was terrible.”

After the scorching start for the Spurs, Dallas went on a 31-4 run to take a 36-29 lead. Coming off the bench, Brunson made three 3-pointers and Kleber added two in that span

“Just the pace, I thought they were moving a little bit faster than that first group,” Kidd said. “That bench got us going, and then everybody else started to participate there in the second half.”

Kleber had a bigger role with Kristaps Porzingis out because of as swollen right knee.

“Maxi was everywhere,” Kidd said. “He was big for us behind the line and also defensively with the blocks and just trying to change shots and rebound. We were down a guy, and he stepped up.”

The Spurs closed the first half with a 20-11 spurt, taking a 49-47 halftime lead when Forbes made his fourth 3-pointer to beat the buzzer.

MORE NEWS: Plano 6th Grader Says Classmate Used Heimlich Maneuver To Save Him From Choking