DALLAS — Facing the NBA’s worst team, the New Orleans Pelicans did what was expected.

They won, overpowering last-place Dallas 99-94 Friday night at American Airlines Center.

The Pelicans just didn’t do it the easy way.

New Orleans (4-5) clearly had the best team on the floor, and more than once it appeared poised to blast the struggling Mavericks (1-9) out of their own building.

Bur despite another virtuoso performance by stars Anthony Davis (30 points, 13 rebounds, four assists, three blocks) and DeMarcus Cousins (20 points, 22 rebounds, seven assists), the Pelicans could not seem to put the game away.

That played out most visibly in the wild final minutes. With 4:39 to go, Davis made two free throws to put New Orleans up 91-74, setting the Pelicans up for what looked like a smooth cruise to a comfortable victory.

Instead, the Pelicans exited sweating as the Mavericks outscored them 17-6 over the next four minutes to close within six when Yogi Ferrell drilled a 3-pointer to make it 97-91.

New Orleans wouldn’t breathe easy until Jrue Holliday blocked Ferrell’s 3-point attempt with 11 seconds left, leading to a clinching dunk by Tony Allen.

The Pelicans came out blazing, appearing ready to blow Dallas out.

Everything was working. On offense, the ball found its way down low into the hands of Cousins and Davis again and again. Once there, it might as well have been in the basket — the duo combined to shoot 9 for 10 in the first quarter.

Meanwhile, the New Orleans defense shut down the Mavericks early. Dallas missed six of its first seven shots, and the Pelicans owned the boards.

Nine minutes in, the Pelicans held a very comfortable 26-12 lead and were dominating every stat imaginable, shooting 67 percent to Dallas’ 27 percent and out-rebounding the Mavericks 12-7.

But Davis and Cousins were carrying the entire load, having scored 21 of those 26 points. When Davis went to the bench for a breather at the 2:30 mark, much of his team’s positive energy went with him.

That allowed the Mavericks not only to climb back into the game but to grab a 31-30 lead when J.J. Barea’s driving lay-in with 10 minutes left in the second quarter capped a 19-4 Dallas run.

Eventually, the Pelicans got their groove back, pushing the lead back to 12 with a 17-4 spurt of their own and extending the margin to 17 in the third quarter. But every time the lead seemed safe, the Pelicans let it slip away.