DALLAS -- Vince Carter drove the baseline and leaped, his feet hovering over the end line, when he reached out with his right hand and made a reverse layup.
Dallas held on for a 114-111 victory Wednesday night after Carmelo Anthony was short on a potential go-ahead jumper with 4 seconds left, then fouled out when going after the rebound.
"Big confidence boost," Mayo said.
The Mavericks (7-6), who will be without Dirk Nowitzki maybe another month, avoided going under .500 for the first time this season by beating what had been the NBA's only one-loss team.
Darren Collison, the point guard who this season replaced Jason Kidd in the Dallas lineup, had 19 points and seven assists. It made up for a 2-of-11 shooting game two nights earlier and a 1-of-8 performance in New York almost two weeks ago.
"First and foremost, it was a collective effort," said Carter, who finished with 25 points. "This was one of (Collison's) best games since the very beginning of the season. He's very hard on himself. ... He wants to win, and that's what I like about him."
Mayo scored 10 of his 27 points over the final six minutes of the third quarter, when Dallas charged ahead with a 20-8 spurt. His 17-foot fadeaway jumper with 43 seconds left in the third broke an 80-all tie and put the Mavericks ahead to stay.
Dallas was up 102-90 on Carter's floater with about 6 minutes left, only a few minutes after his highlight play.
Then the Mavs had to hold on against a Knicks team featuring Kidd and Tyson Chandler, members of Dallas' only NBA championship team just two seasons ago.
Dallas didn't keep Chandler after the lockout that followed its title, and Kidd signed with New York as a free agent last summer after initially indicating he was staying.
"I loved Dallas. What we accomplished as a team will always be special to me," Kidd said. "But now I'm in New York trying to accomplish that again."
Kidd, who said he never got a chance to talk to Mavs owner Mark Cuban, had a season-high 17 points. Chandler had 21 points and 13 rebounds.
Chandler had three three-point plays in a late 21-10 spurt.
The last of Chandler's three-point plays came with 1:37 left, when he was fouled by Carter making a basket and hit the free throw to get the Knicks within 112-109.
After Carter threw up a wild shot at the other end, Kidd grabbed the rebound. Kidd was fouled by Carter and hit both free throws to cut the deficit to one with 1:15 left.
New York had its chances in the final minute. Anthony drove to the basket and drew some contact. There was no foul called, even as he stopped and held his chin and mouth.
While Anthony was slow up the court, Collison's missed badly with 24 seconds left. The Knicks called timeout, and Anthony had time to recover, but came up short on a 15-footer. He then fouled out, and Dahntay Jones sank two free throws.
"With the ball in (Anthony's) hands, we'll live and die with that every time," Felton said.
With about 2½ minutes left after consecutive offensive rebounds by Chandler, Anthony made a spinning move. He threw the ball up and in, but the basket was nullified when he was called for a charging foul against Carter.
Chandler got a nice ovation during pregame introductions, and that was topped by the reception Kidd got when he was the last New York starter introduced.
"It was great. Dallas has the best fans," Kidd said. "The warm welcome is always appreciated. But I know they were cheering for us to lose."
Kidd had an assist on Felton's 3-pointer to start the game, and there were a handful of boos from the crowd when Kidd made an early 3-pointer that put the Knicks up 8-3. There were a few "airball" chants when he came up well short on another 3-pointer right after that.
The Knicks had a 23-13 lead with Felton drove for a layup with 4:27 left in the first quarter. Dallas then scored 11 consecutive points in less than 2½ minutes, going ahead 24-23 on Mayo's driving layup.
Steve Novak made a 3-pointer with just under a minute left in the first, and the Knicks didn't trail again until late in the third.
Anthony has led New York in scoring in nine of its 10 games. ... F Troy Murphy got his first start in 11 games since joining Dallas. He played nearly 18 minutes, but didn't return after halftime because of an upper respiratory illness. Murphy made two free throws and had five rebounds. ... Mavs rookie Jae Crowder, after not playing Monday night, matched his career high 12 points. ... During a timeout in the third quarter, a Mavericks fan made a halfcourt shot to win a 60-inch HD TV. He had already made a free throw for a Blu-ray player and a 3-pointer for a surround sound system.
Would David Fizdale be a good hire for the Grizzlies? Will the team keep free agent Mike Conley? Our crew forecasts the future for Memphis.
David Fizdale, an assistant with the Heat, has been offered the head-coaching job with the Grizzlies and the sides are working on a contract, according to ESPN and a report from The Vertical.
Check out top NBA playoff moments from the past week, including the Toronto Raptors' victory over the Cleveland Cavaliers to tie their series 2-2 and the Oklahoma City Thunder's victory to claim a 3-1 lead in their series with the Golden State Warriors.