NEW ORLEANS, La. (AP) — Danilo Gallinari scored 28 points and the Denver Nuggets eliminated New Orleans from playoff contention with a 134-131 victory over the Pelicans on Tuesday night.

Gary Harris added 23 points, including a contested 3-pointer that gave Denver an eight-point lead inside the final three minutes, and Nikola Jokic had 21 points and 12 rebounds to help the Nuggets remain on Portland’s heels for the final Western Conference playoff spot.

Anthony Davis had 41 points and four blocks. DeMarcus Cousins capped a 30-point, 14-rebound performance with two late 3-pointers, the latter to tie it at 131 with 30.5 seconds left. Jrue Holiday had 18 points and 13 assists, but turned the ball over twice in the last 30 seconds — leading to Denver free throws — and missed a 3-pointer as time expired.

Denver entered Tuesday night’s slate 1½ games behind Portland for eighth in the West. The Trail Blazers were playing in Utah on Tuesday night.

The Pelicans had a chance to set up a winning shot after Wilson Chandler missed one of two free throws with 18.2 seconds left, leaving Denver up by only one. But Holiday mishandled an inbound pass for a back-court violation.

New Orleans quickly fouled Emmanuel Mudiay, but he also missed one free throw, giving New Orleans 13.8 seconds to set up a tying or go-ahead shot. But Holiday’s pass intended for Cousins along the perimeter was intercepted by Harris. Cousins fouled out trying to stop Harris from breaking up court, but Harris missed one free throw, giving New Orleans one last chance for a tying 3 that Holiday missed.

Davis’s back-to-back alley-oop dunks gave him 25 points on 12-of-19 shooting in the first half, when New Orleans set a franchise record for first-half scoring with 75 points on 56.4 percent (31 of 55) shooting. But the Pelicans led by only six because Denver also shot well. Gallinari had 17 points and Chandler 15 in the opening two quarters.

Denver, which shot 51 percent in the first half, was even better in the second, hitting 56.8 percent (25 of 44) and taking the largest lead by either team when Gallinari’s 3 capped a 7-0 run to make it 119-110 with 6:55 to go.

TIP-INS

Nuggets: Denver began the game without forward Darrell Arthur (left knee), shooting guard Will Barton (left foot) and point guard Jameer Nelson (right calf), who had all been listed as questionable. … Forward Kenneth Faried left the game with lower back tightness after playing 10 minutes in the first half.

Pelicans: Finished their home schedule with a record of 21-20 in New Orleans. … Before tip-off, Holiday, who is slated to be a free agent this offseason, spoke on behalf of the team while thanking fans for their support during the home schedule. He closed by saying: “See you next season.”