Kyle Lowry scored a game-high 22 points and hit the 3-pointer with 7 minutes 3 seconds remaining that gave the Toronto Raptors the lead for good Saturday night in a 104-99 win over the Knicks at Madison Square Garden.

Kevin Knox scored 20 points, and DeAndre Jordan posted a double-double with 10 points and 18 rebounds for the Knicks, who tied a franchise record by losing their 16th straight game.

Serge Ibaka had a double-double (15 points and 13 rebounds) for the Raptors, who have the second-best record in the Eastern Conference (41-16) and have won four consecutive games. Danny Green scored 14 points and sank three straight 3-pointers in the fourth for Toronto. Norman Powell also had 14 points, and Kawhi Leonard (11) and Pascal Siakam (10) also scored in double figures.

Marc Gasol, playing his first game for the Raptors since he was acquired from the Memphis Grizzlies on Thursday, scored 7 points and pulled down 6 rebounds in 19 minutes. He came off the bench for the first time since his rookie season in 2008-9.

Mitchell Robinson scored 15 points, Kadeem Allen added 14 points and Dennis Smith Jr. chipped in with 13 points and 6 assists for the Knicks, who have the worst record in the N.B.A. (10-45) and have dropped 24 of 25 and 29 of their last 31 games.

Despite the vast difference in fortunes, the Knicks gave the Raptors all they could handle.

After Leonard opened the game with a 3-pointer, the Knicks scored the next 14 points. They also tied the game three times early in the fourth quarter before Robinson’s three-point play gave them an 86-85 lead — their first since a 38-36 advantage with 3:48 left in the second quarter.

Lowry responded for the Raptors with his go-ahead 3-pointer. After Jordan missed two free throws, Green hit three 3-pointers during a 9-4 run — interrupted only by two free throws and a layup from Allen — to give Toronto a 97-90 lead with 3:28 left.

The Knicks closed to 99-96 on Knox’s 3-pointer with 1:59 left. They had two chances to make it a 1-point game, but Mario Hezonja and Smith each missed jumpers, and the Raptors then made five of their final six free throws.

SUPERLATIVES APLENTY The Oklahoma City-Houston game had two 40-point scorers, a tied triple-double record, and a winning rally from a 26-point deficit.

Paul George scored 45 points, Russell Westbrook matched the league record with his ninth straight triple-double, and the visiting Thunder overcame the large deficit to beat the Rockets.

Westbrook had 21 points, 11 assists and 12 rebounds to match the record streak set by Wilt Chamberlain in 1968. Westbrook has 22 triple-doubles this season and 126 over all.

James Harden led Houston with 42 points, reaching 30 points for the 29th straight game — two shy of Chamberlain for the second-longest streak in N.B.A. history, but far behind Chamberlain’s record run of 65 games.(AP)