The Pelicans have grown accustomed to losing teammates to injury. They couldn’t stomach losing one more game.

And so even as star Anthony Davis left Tuesday’s game against the Dallas Mavericks at halftime — he scored 17 points in the first half and didn’t play in the second with a right hip contusion — the Pelicans found a way to (finally) win.

It wasn’t immediately clear whether Davis would make the trip to or be available for Wednesday’s game in Atlanta. X-rays on his hip were negative, but he was getting further tests Tuesday night.

“When you don’t have a top-five player — in the NBA, not just on our team — out there on the floor, it could be a huge void,” said guard Ish Smith, who had 17 points and a career-high 12 assists. “But I just think the guys played desperate.”

The Pelicans (1-6) were desperate, and it showed right from the start.

Hungry for its first win of the season, New Orleans looked like a different team, both in terms of personnel — point guard Jrue Holiday and center Omer Asik returned to the court — and approach.

The Pelicans forced turnovers on Dallas’ first three possessions. They scored the first 12 points of the game and led 29-22 after one quarter. New Orleans extended its lead to 58-40 at halftime after a strong second quarter from Davis.

But Davis was hit with a knee late in the quarter, coach Alvin Gentry said, and left the game with 2.9 seconds to play in the half. He didn’t return for the third quarter, but other Pelicans picked up the slack.

“Obviously when he goes out, we have to step up,” forward Ryan Anderson said. “Guys have to step up, and we did that.”

Anderson took a leap forward.

He scored 19 of his game-high 25 points in the second half, including 13 in what Gentry called a “really important” third quarter. The Pelicans outscored the Mavericks 36-35 in the third to build on their halftime lead even without Davis on the court.

Anderson added 11 rebounds, and he was hardly the only Pel pitching in with Davis sidelined. Smith, Eric Gordon and Toney Douglas scored 17 points each.

Jrue Holiday — prohibited from playing in back-to-back games as he recovers from a stress reaction in his right leg — returned after missing Saturday’s loss in Dallas and scored all 10 of his points in the first quarter.

Asik appeared in his second game of the season and finished with four points, five rebounds and a block.

“We battled. To me, if we play with that kind of intensity and do it over a period of 48 minutes, then I think we’re a good basketball team,” Gentry said. “But we have to do it. We can’t have those five-minute segments in there where we let teams back in or end up getting separation.”

It will be tougher to play consistently if Davis misses any significant time. Gentry expected to get a further update on his star player late Tuesday night, but with four rotation players already out, Gentry said, New Orleans is prepared to roll with another punch.

“Even with Anthony playing, we’ve got some key guys sitting out,” Gentry said. “You can do one of two things. You can move on and try to play and do the best you can or you can sit around and mope and have a pity party. We don’t have time to have a pity party.”