New Orleans Pelicans All-Star Anthony Davis said he just wanted to add to the chemistry the team developed in winning five of six games while he was out injured with a sprained right shoulder.

That, he did. And the shoulder appears to be OK, too.

In his first game back since Feb. 21, Davis had 39 points, 13 rebounds and eight blocked shots and made two crucial late baskets, as the Pelicans held off the Detroit Pistons 88-85 on Wednesday night at the Smoothie King Center.

“The games I was out, they played aggressive, they played hard, and that’s what you have to do when you have key guys out,” said Davis, who said he had a lot of adrenaline when the game started. “I got dressed earlier than I usually do. It seemed the clock was moving slow.”

Just as effective was Davis’ defense. In just his third NBA season, he finished the game with 437 career blocks, bettering David West’s franchise record of 435. The game ended with Davis’ outstretched arm preventing a tying 3-point shot by Detroit’s Jodie Meeks with one second left.

The points were the most scored by Davis since he hit 41 in a big road win at Oklahoma City on Feb. 6.

He had scored a combined 27 points in the three games he played since then while in and out of the lineup with the injury.

The win gave New Orleans (33-28) a 2-0 season sweep of Detroit and evened their record to 13-13 against Eastern Conference teams. More important, it kept them one game behind Oklahoma City for the eighth spot in the Western Conference playoffs race. The Thunder beat Philadelphia in overtime but has a tough matchup at Chicago on Thursday night.

Davis sank a jump shot from the right side that gave New Orleans an 83-81 lead with 1:14 left, then fought for the rebound after Kentavious Caldwell-Pope missed a 3-point attempt. Tryeke Evans followed with a drive that gave the Pelicans an 85-81 lead with 41.4 seconds remaining.

Davis sealed the outcome with a 14-footer from the right side with 17.9 showing, the Pelicans leading 87-83.

“Coming out of timeout, Coach (Monty Williams) had drawn up a play for me to take a jumper, and it went in,” Davis said. “Then we ran a different play where Tyreke was supposed to drive. But they trapped him, and I was just in a window where he could see me.”

Starting with a Davis block of a shot by Greg Monroe, the Pelicans held the Pistons without from the 9:22 mark to 4:46 of the fourth in taking a 79-71 lead. Even with Davis getting a block of Andre Drummond that helped preserve an 81-77 lead, Detroit kept fighting and tied score at 81 with 1:24 remaining.

Davis scored 12 points in the third, and the Pelicans ended the quarter with a 65-63 lead. He finished the quarter with 31 points.

He scored eight points in the first 3 minutes, 34 seconds of the third quarter, propelling the Pelicans to a 10-2 run that gave them a 52-48 lead.

The run was virtuoso Davis. He scored his first basket 59 seconds into the quarter by going the length of the court after stealing the ball. His next one came on a jump shot after a Pistons turnover. At the 9:27 mark, he tied the score at 48 with two free throws after being fouled on the break.

Then, at 8:26, he threw down a thunderous dunk on the fast break that prompted a Pistons timeout and brought a big broad smile from him. That was his 27th point, matching his total from the first game at Detroit, on Jan. 14, won by the Pelicans.

The Pistons held the Pelicans to 33.3 percent shooting in taking a 46-42 halftime lead despite 19 points by Davis. Davis made eight of 16 shots, but the rest of the team shot 8-of-32 (25 percent).

A series of play late in the quarter showed that Davis’ shoulder

was OK. First, while trying to go baseline and dunk, he was leveled by Drummond, 6 feet 11, 280 pounds with both arms extended. Davis made one of the two free throws. Then, on the next trip up court, he dunked a lob from Evans that got the crowd and the Pelicans’ bench excited.

With Davis back in the lineup, it seemed the Pelicans needed adjusting, going 2½ minutes of the first quarter without scoring, as Detroit took an 18-6 lead. New Orleans ended the quarter trailing 24-17, but Davis had eight points.

The run that began near the end of the first continued into the second, and the Pelicans forged ahead 30-26 at 8:42 of the quarter.