Jeremy Lin scored 31 points off the bench, while Dwight Howard had 18 points and 24 rebounds as the Houston Rockets beat the Toronto Raptors 110-104 in double-overtime to snap a two-game losing streak.
Lin shot 10 of 17 from the field and hit eight of nine from the free-throw line. James Harden finished with 26 points and 10 assists.
Howard was just four of 12 at the foul line.
Chandler Parsons had 18 points, five rebounds and five assists for the Rockets, who could not hold a double-digit, second-half lead for the second straight game.
Rudy Gay led the Raptors with 29 points and 10 rebounds, but shot 11 of 37 from the field. DeMar DeRozan added 22 points, but he struggled as well, finishing six of 25.
Jonas Valanciunas chipped in 10 points and 13 rebounds, Amir Johnson had 10 points and 10 boards, while Kyle Lowry netted 16 for Toronto, who shot 33 percent from the field.
After Harden missed a jumper, Howard grabbed a rebound and gave it to Terrence Jones for a layup to give the Rockets a 106-104 lead with 1 minute, 13 seconds to go in second overtime.
Gay missed a jumper and Johnson missed the tip on the other end, before Lin hit a floater with 33 seconds left to give the Rockets a four-point lead.
Gay missed another jumper, and after review, Houston were awarded the ball with 26 seconds left.
Patrick Beverley made one of two free throws with 20 seconds left and Gay missed a three-pointer with 15 seconds remaining.
Harden made one of two free throws to push the lead to six and ice the win.
Harden scored seven of the Rockets’ first nine points in second overtime, but Gay tied it at 104-104 with a three-point play with 1:50 to go.
Gay tied the score at 95-95 in first overtime, hitting a tough three-pointer from the top of the arc with 0.9 seconds remaining, before Lin missed a three-pointer at the buzzer to send the game to a second extra period.
Trailing 80-66 after Lin’s layup with 8:32 remaining in the fourth, Toronto knotted the score at 84-84 six minutes later on Terrence Ross’ follow shot, capping an 18-4 run.
Harden made one of two free throws to tie it at 87-87 with 34 seconds remaining, before Gay missed a jumper with 12 seconds left. However, the referees called a 24-second violation, saying the ball never hit the rim.
After a review, the officials decided the ball did hit the rim and they jumped it up at midcourt, with the Rockets winning it, but Harden’s jumper at the buzzer was short, sending the game to overtime.