NEW ORLEANS — Dallas Mavericks guard Vince Carter has been there before, making big shots in playoff games.

To Carter, Friday night’s game against the New Orleans Hornets was one with those types of implications, and he made a 3-pointer with 6.5 seconds left to key the Mavericks’ 104-100 victory at New Orleans Arena.

Dallas had gotten the ball after Hornets point guard Greivis Vasquez missed a 3-point attempt with 22.2 seconds left. Carter said the play was designed for Mavericks forward Dirk Nowitzki, who scored a game-high 25 points, but the Hornets were switching defensively.

“I looked at him to see what he wanted, and he gave me the nod to take it,” said Carter, who finished with 22 points, most of it coming on 5-of-7 3-point shooting. “I’ve never been afraid to take the big shot.”

The Hornets still had a chance to win or send the game to overtime, but Dallas guard O.J. Mayo made a big defensive play, knocking the ball off the leg of the Hornets’ Eric Gordon after the ball was inbounded by Ryan Anderson.

Gordon was livid at the call, but it was reviewed by the officials and ruled to be correct.

“I knew they were going to try to get the ball to him because he’s a good offensive player,” Mayo said. “I wanted to make him work hard to get it.”

Former Hornets guard Darren Collison sank two free throws with 3.1 seconds left to seal the outcome.

It was the Hornets’ third loss in a row and second consecutive at home after a promising stretch before the All-Star break in which they had won four of five.

Dallas won got its fifth victory in six games and avenged a Jan. 5 loss in which Gordon made a three-point play with 4.1 seconds left in overtime. Gordon scored 23 points Friday but had only three in the second half. He made just one of his final nine shots.

Jason Smith and Anderson picked up the slack in the second half, with Smith scoring 16 of his 22 and Anderson 18 of his 20.

It was a tough loss for New Orleans, which led 100-96 with 55.5 seconds left after Anderson sank a 3-pointer at the shot-clock buzzer. But that’s when things began to unravel.

Dallas guard Mike James, another former Hornet, made a 3-pointer with 42 seconds left. Vasquez then missed his 3-point attempt, setting the stage for Carter, who hit a wide-open shot.

“We thought our spacing ... I mean, it was a tough decision,” Vasquez said. “I should have driven, but I didn’t have a lane to drive.”

Hornets coach Monty Williams was disappointed with the loss because his team had a win in its grasp but couldn’t close it out.

“Down the stretch, you’re up four, you have the ball in your guard’s hands and you can’t make plays,” he said. “You can’t blame anybody but yourself, and that’s Basketball 101.”

Williams said the key to the loss was outcome, specifically two big quarters by the Mavericks, who averaged 105 points in their previous five games.

“They scored 35 points in the first quarter and 30 in the third,” Williams said. “To me, that is the game.”

The outcome ruined an impressive effort by the Hornets, who took the fight to their Southwest Division opponents, particularly after falling behind. New Orleans trailed 27-16 midway through the first quarter but outscored the Mavericks 42-26 from that point until the end of the half to take a 58-53 halftime lead.

The Mavericks came back with the strong third quarter and entered the fourth leading 83-79. It was early in the third when Anthony Davis left with a sprained left knee and did not return. Davis said he could have returned, but the team was being cautious.

He said the knee was not swollen and that he expects to play Sunday against Sacramento.