DALLAS (AP)Luka Doncic had 38 points and 11 rebounds in his return from a one-game absence, and Spencer Dinwiddie added 20 points and 10 assists as the Dallas Mavericks beat the Oklahoma City Thunder 121-114 on Monday night.

Tim Hardaway Jr. scored 20 for the Mavericks, who ended a two-game skid.

The Thunder cut a 15-point second-half deficit to 119-114 with 28 seconds to play. Dallas’ Reggie Bullock hit two free throws with 15.8 seconds left, and Maxi Kleber made a steal on Oklahoma City’s subsequent possession.

”We got just enough stops,” Dinwiddie said following his first double-double of the season.

One of his four 3-pointers was a bank shot from 29 feet early in the fourth period to beat the shot clock.

”I just stay focused and let it fly,” Dinwiddie said.

Shai Gilgeous-Alexander matched his career high with 42 points for the Thunder, who lost their third straight in the finale of a five-game road trip.

The Mavericks outscored the Thunder in only one quarter, 43-24 in the second, and led 66-52 at halftime. Dallas made 10 of 16 3-pointers in the period, paced by Hardaway going 4 for 5 and Bullock 3 for 3 behind the line.

”Any stretch of the game can beat you,” Thunder coach Mark Daigneault said. ”We just couldn’t stop the bleeding in the second quarter enough to keep it reined in.”

Doncic sat out a 29-point loss at Chicago on Saturday night with a strained right quadriceps. The Mavericks were completing a back-to-back, having played at home Friday in a 9 p.m. start.

Doncic was 13 for 27 from the floor and 9 of 10 at the free throw line. In his previous game, he hit only four of 10 free throws as the Mavericks shot a season-worst 41.7% from the line (10 of 24) in a 106-105 home loss to Milwaukee.

The Mavericks hit 22 3-pointers, two short of their season best, on 51 attempts. They went into play averaging 40.6 3-point attempts per game, third in the NBA.

”Every time they made a run, we made a big 3,” coach Jason Kidd said. ”It’s good to see the ball start to go in.”

The Thunder, who averaged 11 for 34 on 3-pointers going in, were 10 of 31.

”You can’t really control how many 3s a team wants to bomb against you,” Daigneault said, ”but the contested-ness of those is the difference.”

Dallas raced to a 12-0 lead 3 1/2 minutes in, helped by Oklahoma City missing its first five shots and committing two turnovers. The Thunder answered with a 26-7 run to build a seven-point lead and led 28-23 after the first quarter.

DOUBLE TRIPLE-DOUBLE WATCH

Doncic, the NBA leader in triple-doubles this season with six, took 32 points, 11 rebounds and eight assists into the fourth quarter but failed to get another assist while playing six more minutes.

Dinwiddie had seven rebounds.

The Mavericks have never had two players with triple-doubles in the same game.

TIP-INS

Thunder: Gilgeous-Alexander, second in the NBA in free throw shooting at 92.9% going into play, hit all 11 from the line. . Jeremiah Robinson-Earl was taken to the locker room early in the fourth.

Mavericks: Entered averaging an NBA-low 38.4 rebounds per game but outrebounded the Thunder 50-42, leading to a 24-13 advantage in second-chance points. . Doncic was assessed his sixth technical foul this season and said he was yelling at teammate Dwight Powell. . Reserve G Josh Green missed his second consecutive game with a sprained right elbow and will be evaluated after a few more games, Kidd said.

UP NEXT

Thunder: Open a seven-game homestand, their longest of the season, Wednesday vs. the Miami Heat.

Mavericks: Host the Cleveland Cavaliers on Wednesday.

More AP NBA: https://apnews.com/hub/nba and https://twitter.com/AP-Sports