Carmelo Anthony scored 31 points as the New York Knicks beat the Brooklyn Nets 100-86 Wednesday night.

Anthony, who was out in the previous two games because of an ankle injury, made a nice comeback, against their rivals Nets.

He shot very well in the game and making 12 of 22 attempts from the field, which included four 3-pointers.

"At the end of the day, these are statement games, these are big games, divisional games," the Associated Press quoted Anthony as saying. "They're right across the bridge, so these games definitely mean a lot."

J.R. Smith scored 19 points, while Tyson Chandler added 16 points and 12 rebounds. The Knicks dominated the second half aided by Chandler's 12 points on 6-of-8 shooting.

"I just wanted to close the game. I wanted to make a statement," Chandler said. "Tonight was a big game for us, a game in our division, an opportunity to gain a full game as far as the lead goes, and we have to make statements like that."

For the Nets, Joe Johnson was the top scorer with 17 points, while Deron Williams and Brook Lopez had 16 points apiece. The Nets have lost eight of their last 10 games.

"We have a lot of season left. We'll get it turned around," Nets coach Avery Johnson said. "We're going to get back in the lab on Friday and work on some parts of our game and get this bad taste out."

New York outscored the Nets in all four quarters.

"Once they started hitting the way they did, it's kind of deflating," Williams said. "It takes you away from your game. You try to get it all back at once instead of being patient and executing like we did in the first half."

Anthony played over 35 minutes on his return, and looked none the worse for wear.

"He looked good to me. If he's not 100 percent, I'll take whatever percent he was tonight, because that was awesome," Knicks coach Mike Woodson said.

In the third quarter, New York outscored the Nets 23-19 with Chandler making four impressive dunks in the quarter.

New York again outscored the Nets in the fourth quarter 25-19 to win the game by 14 points.