DALLAS >> The Lakers’ roster moves this month, while important, are ultimately their secondary concern.

In the moments that matter most, they need their stars to be at the peak of their powers.

After 20 games off with injury and tentative steps back into his on-court role, Anthony Davis strode into the spotlight in the closing minutes of the Lakers’ dramatic 27-point comeback — the largest deficit any team has overcome this season — to beat the Dallas Mavericks 111-108 on Sunday.

Davis posted up Luka Doncic and spun into a turnaround jumper to give the Lakers a three-point lead with 18.1 seconds to play.

“I’m a bucket,” he shouted toward Doncic and the Mavericks bench. “I’m a (expletive) bucket.”

The Lakers are a better team when Davis is making his shots, but they’re also better when the 29-year-old big man wears his bravado on his chest.

It’s the side of Davis that was seen earlier this season as he rampaged through the league on an MVP-type tear. And it reemerged just in time for the unlikeliest of comebacks as the Lakers erased what was looking like a road rout and won their third straight game against one of the more imposing Western Conference star duos.

“That’s when you see it – when he’s really emotionally, spiritually involved in game, not just physically,” coach Darvin Ham said. “And we tried to ride him a little bit and feed him, calling his number continuously and he delivered. Just changing shots defensively, rebounding, getting out, really going to his spots, knowing what he wanted to get out of each offensive possession. It was huge.”

Davis led with 30 points, 15 rebounds and three blocks, while LeBron James, who was able to walk out of American Airlines Center under his own power but with a significant limp after hurting his right foot when he landed awkwardly on a third-quarter lay-up, had 26 points. The pair had some of their best moments down the stretch, combining to score the team’s last three field goals. Davis hit the winning free throw at the line with 12.7 seconds left.

The Mavericks made a push with a late 3-pointer by Justin Holiday, but Dennis Schröder made a pair of free throws and Kyrie Irving (21 points) missed a tying shot attempt from half court. Doncic led with 26 points, but the Lakers outscored Dallas 64-47 in the second half.

It was a spectacular turnaround for a Lakers team that missed its first 14 attempts from 3-point range and quickly got down into a 20-point hole in the second quarter. It was the Lakers’ largest comeback in 21 years, since a December 2002 game also against the Mavericks.

Ham said the game had its “depressing” moments, but for a team that already authored a 25-point comeback last month, no lead ever feels quite out of reach.

They got a huge shot in the arm from Jarred Vanderbilt, one of their trade acquisitions from Utah, taking the baton from Malik Beasley who lead the team in scoring in the previous game against the Warriors. The lanky 23-year-old, a Texas native himself, took on the task of guarding Doncic for the lions’ share of possessions, but also showcased his hustle with 15 points, 17 rebounds (eight on the offensive glass) and 4 steals. Even though defenses have a tendency to play off of him as a non-shooter, he finds ways to make them pay.

“Teams turn their head because they’re not paying attention to him because they don’t think he’s a threat, and he goes backdoor for a layup as you saw in the fourth quarter on the reverse,” James said of Vanderbilt’s impact. “Teams are not accounting for him when shots go up, so you saw the eight offensive rebounds that he had. His energy, his effort alone, he knows where to be on every single possession. And he knows how to utilize teams not accounting for him as an offensive threat.”

As Vanderbilt cheekily noted, one of the reasons the Lakers were able to pile up 65 rebounds was because their shots were so often bouncing everywhere but in the net. The Lakers were just 16 for 50 from the field in a dismal first half that didn’t see them sink a successful 3-pointer until Troy Brown Jr. finally made one more than 17 minutes into the game.

During the second quarter, after Christian Wood drained yet another three on the Lakers, putting Dallas up by a game-high 27 points, Beasley — who had yet to make an attempt in the first half — slammed the ball against the stanchion in frustration.

But the Lakers closed the quarter with tempo, even if their shooting touch never quite arrived. Instead of lingering outside the perimeter and clanking more shots, they attacked the paint, where the Mavericks were decidedly undermanned — especially without one of their best defending forward Maxi Kleber. They would wind up with a 30-point edge in paint scoring, helping make up for shooting 14 fewer 3-pointers than the Mavericks.

“I feel like we were good on the glass, in transition, and we’ve got a lot of different guys who can play a lot of different ways and impact the game in a lot of different ways,” Vanderbilt said. “I think tonight, even though the shots weren’t falling, we didn’t get discouraged. We kept playing, kept fighting.”

The Lakers had crunched the deficit to 14 points by halftime, and in the third, Jarred Vanderbilt swept through like a wave, pressuring the ball and forcing three steals on his own to ignite the fast break. The Lakers bested the Mavs 31-20 in the third quarter — statistically they’ve been one of the league’s worst performing teams in that frame — and Vanderbilt and Davis combined for 19 of those points.

At the start of the fourth, James cashed in a 3-pointer to tie the game for the first time since the first quarter. Moments later, he drove in for a layup to give them the lead.

The Lakers are clawing for life at the moment, after spending most of the season at 13th in the Western Conference standings. Their third straight win helped propel them to only one game out of a play-in spot in a contentious middle of the pack.

“We knew going into the break after our last game, before the break, we encouraged everybody to get some rest but know that coming out of this break, we have to be ready to be busy,” he said. “And really start forcing our will, so to speak, on the rest of this season so that we can secure a spot and get to where we want to get to. And you’re witnessing the process of that.”