DALLAS -- O.J. Mayo and Vince Carter combined for 52 points as the Dallas Mavericks escaped with a 114-111 victory over the New York Knicks on Wednesday night at American Airlines Center.
New York (7-2) had a chance to pull out the win with a furious rally down the stretch, but Carmelo Anthony's jumper with less than five seconds left came up short.
Mayo scored 27, with Carter adding 25 off the bench. The Mavericks (7-6) needed the win to stay above .500 -- they haven't been below this season -- with the Los Angeles Lakers coming to town Saturday.
New York was paced by Anthony, who scored 19 of his 23 in the second half. The Knicks have lost both of their games on the road this season, the other coming Nov. 16 at Memphis. New York is at Houston on Friday.
The Mavericks scored 65 points in the second half, a stat that didn't sit well with New York.
"We took a step backwards, and a lot of that was in our transition defense," Knicks coach Mike Woodson said. "But, hey, it's one game and we just have to go back and tear this tape down and break it down and learn from it because we had an opportunity tonight."
Darren Collison snapped out of a mini-slump with 19 points and seven assists for the Mavericks. Dallas rookie reserve Jae Crowder knocked down three 3-pointers and scored 12.
Carter, appearing in his 999th regular-season game, did his damage in just 23 minutes. Carter made 9 of 17 shots in his highest-scoring game since joining the Mavericks last season.
"I've kind of been in a shooting slump," Carter said. "I just went back to work in the gym, get my shots up and keep believing. Tonight my shot felt good and my body felt better. I'm a little banged up, but at the same time I felt a little better and just let my shot fly."
The Mavericks overcame an eight-point deficit in the third quarter with 20-8 run going into the fourth. The Knicks got somewhat sloppy with the ball and Dallas took advantage.
Mayo continued to attack and Crowder made his presence felt. The second-rounder drilled a 3-pointer to give Dallas its first lead (80-77) since the first quarter.
The Mavericks continued to apply the heat in the final period, pushing their lead to 12 in the first five minutes. Dallas did so with Mayo on the bench, but Carter and Crowder more than picked up the slack.
"Even though the Knicks had a great first half, we still knew we had a chance to still win the game," Collison said. "The way that they were knocking down 3s and the way we were playing offensively, it was only a matter of time before they started missing some shots.
"We knew we were going to come around, and we did and stuck with it tonight. We kind of had a little letdown towards the end of the game, but what I'm proud of is that even though we had a letdown we still grinded it out and got the win."
New York got within four (105-101) with four minutes remaining before Carter answered with a 3-pointer. The Knicks weren't done. Tyson Chandler (21 points and 13 rebounds) helped fuel a finishing kick by New York that almost changed the outcome.
"They did a good job, especially on that last play," Chandler said. "I tried to get them off of Carmelo, but they played excellent defense. They really forced us into some tough shots down the stretch."
Knicks guard Jason Kidd had a season-high 17 points in his first game in Dallas since leaving the Mavericks in free agency in the offseason.
New York went into halftime up 54-49. The Knicks were a study in ball movement throughout the first half, shooting 50 percent and piling up 14 assists.
Five of the visitors scored at least six by the break and Anthony wasn't included in that group. Chandler had 12 points, Raymond Felton added 10 and Kidd had nine. Rasheed Wallace provided a spark in the second quarter, with six points and three rebounds.
The Mavericks played catchup throughout but finished the second quarter strong. Mayo had 13 points at the half, while Carter scored 11 -- all in the second period.
The Knicks opened fast, seizing control of the game with an 8-3 surge in the first two minutes. Kidd was especially active early at both ends as New York gave its sizable contingent of fans plenty to cheer about.
Anthony and Felton also got into the act as New York continued to push tempo. Chandler gave the Knicks their first double-digit lead at 21-11 with a layup midway through the first quarter.
The Mavericks found their stroke behind Mayo and quickly carved into the New York lead. Mayo's driving basket capped an 11-0 run and gave Dallas a 24-23 edge late in the first.
The Knicks finished the period with a 5-0 spurt to take an advantage into the second quarter.
NOTES: Dallas has won 19 of the last 23 in the series, but the Knicks beat the Mavs earlier this month. ... Forward Troy Murphy made his first start for Dallas in place of Elton Brand. Murphy, though, left game with an upper respiratory illness in first half and didn't return.