TORONTO -- Carmelo Anthony poured in 37 points to lead the New York Knicks 99-94 over Toronto on Friday, sending the Raptors to their third consecutive loss.

The Knicks spoiled a strong night by Alan Anderson, who scored 20 of his career-high 35 points in the third quarter.

DeMar DeRozan added 18 points for the Raptors (26-43), who've lost 10 of their last 13. Jonas Valanciunas added 10 points and grabbed seven rebounds.

Kenyon Martin added 19 points and 11 boards for the Knicks (41-26), who've won three in a row. JR Smith added 14 points.

The Raptors, who are winding down yet another disappointing season, never led after early in the first quarter against a Knicks team that is in hot pursuit of the Atlantic Division title.

The Knicks led by as much as 15 before taking a 77-71 advantage into the final 12 minutes in front of a sellout crowd of 19,800 fans at the Air Canada Centre.

Toronto pulled to within two points with 6:17 left in the game after seven consecutive points by DeRozan. But a basket by Anthony -- the league's second-leading scorer -- capped a Knicks mini-run that had the visitors back up by 10 with 2:16 to play.

A three-pointer and a pair of free throws by Anderson, and a tip-in by rookie Terrence Ross, in the final minute made the score perhaps more respectable on a lackadaisical night for the Raptors. Ross threw up a dreadful miss on a three-point attempt on Toronto's final possession to send most of the fans to the exits.

The Raptors played much of the game without Rudy Gay, who tweaked his bothersome back with seven minutes left in the first half and didn't return.

The Raptors won't have long to lament this loss -- they'll get another shot at the Knicks almost immediately when the two teams play Saturday at New York.

The Raptors never led after midway through the first quarter, the Knicks using a 15-4 run to go up by 10 with two minutes to play in the first. The Knicks took a 25-22 lead into the second.

Toronto would come within two before the Knicks stretched their lead to 15 late in a first half that saw the Raptors shoot just 4-for-14 from three-point range. The Knicks were up 50-37 at halftime.

Anderson scored the Raptors' last nine points of the third quarter as Toronto pulled within four points. Anthony drained a fadeaway jumper from 18 feet at the buzzer to send the Knicks into the fourth with a 77-71 lead.