Updated

New York, NY (SportsNetwork.com) - Kyrie Irving's season-high 37 points and two timely LeBron James baskets helped the Cleveland Cavaliers avenge an opening-night loss to the New York Knicks and leave Madison Square Garden with a 90-87 win.

The Cavaliers trailed for most of the second half, but James scored five straight points late in the fourth to put them back in front. Irving's lefty scoop layup over two defenders with 10 seconds left made it 90-87.

The Knicks went to a Carmelo Anthony isolation on the game's final possession. Anthony shook James and shot a 3 from the right wing, but it was just off the mark. Iman Shumpert tipped the rebound out to Jose Calderon, who hit a 3 a full second after the final buzzer.

Irving hit 12-of-18 from the floor and made 10 of his 11 free throw attempts for Cleveland, which has won a season-high five straight games. James gave 19 points and 12 assists, and Kevin Love posted 11 points and 11 boards.

"(LeBron) did a heck of a job finding me," Irving said. "Everybody kept feeding me. I felt like I was in a great rhythm tonight."

The Cavaliers dropped a 95-90 decision to the Knicks on Oct. 30. Since then, New York has managed just three more wins in 19 games.

Tim Hardaway Jr. paced the Knicks with 20 points off the bench. Amare Stoudemire had 18 and Quincy Acy scored a career-high 15 in New York's sixth straight setback.

"It's tough, but that's what we're pros for," said Hardaway. "We just have to continue to keep fighting, keep grinding. All we can do is go up."

Anthony shot just 4-for-19 for nine points.

Neither team led by more than four during a back-and-forth first quarter. James had five points and five assists, and Cleveland led 25-24 after one.

Irving opened the second quarter with a layup before Cleveland went cold, missing four straight shots and turning the ball over three times during a 13-0 Knicks run.

Hardaway scored 11 of the 13, including three 3-pointers, and New York climbed out to a 37-27 lead.

The Knicks might have opened a larger lead had it not been for Irving. The former No. 1 pick scored 17 points on seven shots in the frame, with his 3- pointer in the closing seconds pulling the Cavs to within 53-50 at halftime.

Cleveland chipped away and eventually tied the game at 64 on a James layup with 3:21 left in the third. Irving then put the Cavs in front with another layup, but New York scored nine of the last 11 points in the quarter to take a 73-68 lead into the fourth.

New York clung to a narrow lead until James hit a deep triple with just under four minutes left to put Cleveland back in front. Then, Irving took it from Calderon and sent it ahead to James for a breakaway slam.

Irving's first two assists of the game gave the Cavs their largest lead since the first quarter with 3:26 to play.

Stoudemire's layup made it 88-87. Shane Larkin then had a chance to give the Knicks a lead with a short runner, but it rimmed out with 39 seconds left and Anthony missed a tip-in.

Game Notes

Hardaway had four of New York's eight made 3-pointers. NY shot 8-of-26 from beyond the arc ... The Knicks outrebounded the Cavs 47-33 ... Six Knicks players had at least three assists. No one on the Cavaliers aside from James had more than two ... Cavs guard Mike Miller left the game with concussion- like symptoms.