NEW YORK (AP) -- The basket was shaking and Tyson Chandler was screaming, definitely toward though maybe not at the voices he recognized near the Dallas bench.
His more important words came long before that dunk that helped the New York Knicks put away the Mavericks.
Chandler told his teammates at halftime not to let their perfect record get ruined, and they responded with a 104-94 victory Friday night to improve their best start in nearly two decades to 4-0.
''Tyson's always vocal. In the locker room he was very vocal, just about not letting this one slip away from us,'' said Carmelo Anthony, who led the Knicks with 31 points.
''We got up to play in that third quarter, second half, got up defensively, denied the passing lanes and we played our defense that we've been playing for the last week.''
Reserve JR Smith added 22 points for the Knicks, the only unbeaten team in the NBA. They hadn't been perfect after four games since the 1993-94 team started 7-0 en route to the NBA Finals.
The Knicks averaged 104.7 points and allowed just 85.3 per game while routing Miami and sweeping a home-and-home series from Philadelphia to start the season, but didn't seize control of this one for good until nearly the midpoint of the fourth quarter.
O.J. Mayo scored 23 points for the Mavericks, who had their three-game winning streak snapped and lost to the Knicks for just the fourth time in the last 22 meetings.
Playing without injured starters Dirk Nowitzki and Shawn Marion, the Mavericks had shot 60 percent in consecutive games for the first time in franchise history and were averaging 116.3 points on 56.2 percent shooting during their win streak.
But they managed only two more field goals after Mayo's layup cut the Knicks' lead to 90-86 with 7:32 remaining. New York scored the next eight points, five from Anthony, to pull away.
''New York's a veteran team and if you give them more possessions and you give them possessions on catastrophic turnovers, they're going to convert them into points,'' Dallas coach Rick Carlisle said. ''They're a very good team. In my opinion they're one of the handful of teams that has a chance to come out of the East.''
In the first meeting since Jason Kidd left Dallas to sign with New York, he played only 16 minutes as the Knicks went with Smith, who got hot in the third quarter while they opened an 84-78 lead.
Kidd seemed on the verge of returning to the Mavs in July before signing with the Knicks. Dallas owner Mark Cuban was angry, believing Kidd backed out of a deal, and said before the game he was done talking about the point guard.
With Kidd joining Chandler, the Knicks have two starters from the Mavs' 2011 NBA championship team, a club the aging Knicks mentioned often during the preseason as a team that showed older groups could win.
Chandler provided the game's first double-digit lead at 96-86 with a ferocious follow dunk and free throw after being fouled, screaming in the direction of the Dallas bench after the basket.
Chandler said he's disappointed the Mavs didn't re-sign him and others from the title team, never taking a shot at defending their crown. But he thinks the Knicks might be building something similar now.
''Definitely reminds me of the chemistry, personalities, personnel that we had,'' he said. ''We were just really deep on that team. We hit teams with waves and teams couldn't really catch up with it, our first and second unit. It's the same thing here. We have great depth and that has to be our weapon.''
New York finished with eight 3-pointers after making an NBA-record 43 in its first three games.
''They're playing hard and they're getting wins,'' said Mavericks forward Elton Brand, back after missing a game following the birth of a child. ''4-0, that's a good start for any team.''
Anthony scored 10 points in the first quarter as the Knicks took a 25-23 lead. Mayo opened the second with consecutive 3-pointers, and seven straight points by Vince Carter later in the period gave Dallas a 41-32 lead. The Mavericks were ahead 57-55 at the break.
Notes: Marcus Camby made his season debut after sitting out the first three games while getting back in shape. He missed most of the preseason with a strained calf. The center became the fourth-oldest player in Knicks history at 38 years, 7 months, 18 days - with two of the older ones coming this season. Herb Williams, now a Knicks assistant, was 41, 2 months and 16 days in his final appearance. Kurt Thomas is 40 and Jason Kidd is 39. Rasheed Wallace (38-1-23) rounds out the top five. ... For their heroic actions during Superstorm Sandy, the Knicks honored Jon Candelaria of New York, and Dr. Pradeep Mally, Gail Geraghty and Erica Chong of NYU Langone Medical Center with this month's Sweetwater Clifton ''City Spirit'' award, named for the team's first African-American player and recognizing those who have made a difference in the lives of others. Candelaria rescued a driver who was stuck in a stalled taxi that was nearly submerged by water, while the hospital employees carried infants to safety after the facility lost power. Also, an MSG Network and Garden of Dreams foundation fundraiser raised nearly $200,000 for storm aid. ... Both teams wore special blue shooting shirts with red and white and stars surrounding the NBA logo as the league celebrates Veterans Day this weekend.