Luka Doncic of the Mavericks celebrates with James Johnson after making a 3-pointer against the Celtics Tuesday night in Dallas. Sam Hodde/Associated Press

DALLAS — Luka Doncic slammed the scorer’s table in joy this time, rather than anger.

Doncic hit a tie-breaking 3-pointer with 0.1 seconds remaining – his second go-ahead 3 in the final minute – and the Mavericks avoided a fourth-quarter collapse in a 110-107 victory over the Boston Celtics on Tuesday night.

The Celtics trailed by 11 points with three minutes to go before Jaylen Brown put them in front in the final minute with a short jumper. Doncic answered with a difficult 3 over 6-foot-8 Daniel Theis before Brown pulled Boston even at 107-all with another bucket.

Doncic did it again – this time with Kemba Walker running at him on a step-back shot from the left wing – and turned to the scorer’s table in the same way he had after a last-second loss to Phoenix. Devin Booker hit the go-ahead shot in the final seconds of that game before Doncic’s desperation attempt missed. That 109-108 loss capped a six-game losing streak.

After the latest dramatic shot similar to one Doncic drained to beat the Los Angeles Clippers in Game 4 of a first-round series in the playoff bubble, Boston’s desperate inbound toss toward the basket hit the rim, sealing the Dallas win.

“It’s just something that I’ve been doing, I tried to do,” said Doncic, who missed a wide-open 3 that would have tied Portland late in a 121-118 loss on Feb. 14 before an eight-day break forced by two weather-related postponements.

“But sometimes you’re going to miss it, like the last game against Portland. Sometimes you’re going to make it.”

Doncic scored 31 points on 6-of-8 shooting from 3, and Brown had 29 and Jayson Tatum added 28 in an All-Star matchup for the trio after Brown and Tatum were named Eastern Conference reserves earlier in the day. Doncic is a West starter for the second straight season.

Playing without Kristaps Porzingis for a second straight night on a back-to-back because of a tight lower back, Doncic was steady to help Dallas build a fourth-quarter lead before another spectacular finish five days before his 22nd birthday. He had 10 rebounds and eight assists.

“He’s just a very unique player, a very unique person,” Coach Rick Carlisle said. “The wiring of people like Luka Doncic, Michael Jordan, LeBron James, Larry Bird, Kobe Bryant, guys that have this laser-like focus in these situations. It’s difficult to explain how their minds and their brains work.”

The Mavericks won for the seventh time in nine games to get back to .500 for the first time in almost a month while dropping Boston below .500 for the first time since the third game of the season. The Celtics were coming off an overtime loss at New Orleans when they blew a 24-point lead in the second half.

“It took two tremendous shots by a great player to beat us,” Boston Coach Brad Stevens said. “Obviously that’s another heartbreaking loss. But that feels a little bit different than it did Sunday.”

Brown was 12 of 20 from the field on the same day he made his first All-Star team, and Tatum earned his second straight selection. Walker scored 14 of his 21 points in the fourth to help the Boston rally, but the Celtics ended up under .500 this late in the season for the first time since 2014-15.

“I don’t feel very much like an All-Star because we’re below .500,” Brown said. “I think this is the most I’ve lost since I’ve been here. I’m hopeful that we’ll string some games together and make a run. It’s very much in our grasp to do so.”

NOTES: Brown and Tatum are just the second pair of under-25 Boston teammates to make the All-Star Game, joining Bob Cousy and Ed Macauley (1953). At 22 years and 357 days, Tatum is the youngest Boston player with multiple All-Star bids. … Brown and Tatum struggled from 3, combining to go 5 of 18.

Comments are not available on this story.