MIAMI -- LeBron James couldn’t wake up Sunday. He was sluggish when his alarm went off at 8 a.m. and still in a funk when the Miami Heat and New York Knicks tipped off five hours later.

He eventually got into form, just in time to perhaps doom the Knicks’ playoff chances.

James scored 38 points and the Heat survived an NBA-record 22 3-point attempts from New York’s J.R. Smith in a 102-91 victory that kept Miami atop the Eastern Conference standings.

"You do your job and you live with the results," James said. "We lived with the result of J.R. making some of those bombs."

Chris Bosh added 14 points and Ray Allen had 12 for the Heat.

Smith was 11 for 28 from the floor, 10 for 22 from beyond the arc, and took 10 3s in the fourth quarter alone while Carmelo Anthony didn’t attempt a single shot in the period.

The single-game mark was previously held by Damon Stoudemire, who hoisted 21 3s on April 15, 2005.

"It’s not really been a goal of mine," Smith said. "I saw the open 3 and tried to take them. I had to take advantage."

Smith finished with 32 for the Knicks, who got 14 from Raymond Felton and 13 from Anthony on 4 for 17 shooting. Anthony has been bothered by a sore right shoulder, but played 44 minutes.

"Melo is still hurting," Knicks coach Mike Woodson said. "I couldn’t rest him again tonight. That second half, he was giving us what he’s got."

The Heat (53-23) ensured they would finish the day still ahead of Indiana atop the East standings. New York (33-45) has only four games left and will be either two or three losses behind Atlanta when Sunday ends, depending on the outcome of the later game between the Hawks and Pacers.

"Our fate is almost now in Atlanta’s hands," Anthony said. "It’s tough. ... My fate is in somebody else’s hands."

The start suggested it would be a great day for the Knicks.

James had four turnovers in the opening minutes and New York -- which had its best opening 2 1/2 minutes offensively in at least a decade, according to STATS LLC -- held a 16-3 lead.

"Flummoxing," Heat coach Erik Spoelstra said. "It was bizarre. Our turnovers were, no offense to the Knicks, absolutely unforced."

It was still 16-3 when Felton was whistled for a second early foul, and everything changed. The Knicks missed six straight shots and the Heat scored nine straight points. James -- who had one turnover in the final 3 1/2 quarters -- settled down and things started going Miami’s way.

"I wasn’t awake yet," James said.

Miami got snippy with one another in plenty of huddles during the game, something that Spoelstra seemed to particularly relish.

"Verbally spitting at each other, I like it," Spoelstra said. "That’s what we need to get ready for the second season."

Miami’s lead was 15 with just under 9 minutes to go before the Knicks made it interesting. Iman Shumpert missed a wide-open 3 with 3:30 left that would have gotten New York within four. James answered a layup at the other end and after Smith made his ninth 3, Mario Chalmers answered with one of his own, making Miami’s lead 97-88.

So Smith made another, giving the Knicks life. And Miami again answered, this time Bosh doing the long-range honors to restore the nine-point edge.

Miami played without Dwyane Wade (hamstring), Greg Oden (back) and Chris Andersen (back, knee). Amare Stoudemire scored 12 and Tyson Chandler finished with 10 points and 11 rebounds for New York.

James had four turnovers by the time Miami scored six points. But he settled in before the quarter was over, outmuscling Tim Hardaway Jr. for what became a three-point play. Hardaway tried to wrap James up on a break, but the four-time MVP kept going, scored and then flexed a biceps muscle to the roaring crowd.

"Trying to make a play," James said.

And after that sizzling 14-point beginning, New York needed more than 13 minutes to score its next 14 points. A 31-10 run helped the Heat take as much as an eight-point lead in the second quarter, before the Knicks went into halftime up 50-48.

Miami found some breathing room by scoring the final seven points of the third. James laid it in while getting fouled with 4.1 seconds left -- and as "M-V-P" chants rained down he gave Miami its biggest lead to that point, making the free throw that put the Heat up 73-64 entering the fourth.

Bobcats 96, Cavaliers 94, OT

CLEVELAND -- No one will fault the Charlotte Bobcats for taking a moment to savor their second postseason appearance in franchise history.

They’ve come a long way in a short period of time.

Al Jefferson scored 24 points, including seven in overtime, and the Bobcats clinched a playoff spot with a 96-94 victory over the Cleveland Cavaliers on Saturday night.

Charlotte is in the postseason for the second time in its 10-year history and the first time since 2010. The Bobcats (39-38) are over .500 for the second time this season and hold seventh place in the Eastern Conference.

Steve Clifford, the Bobcats’ third coach in three seasons, praised his team’s character.

"This is a significant accomplishment for our group of guys, and it puts us in a different place in the league," he said. "The guys in the locker room are excited -- and they should be -- because we’ve got a good group of guys and a group of guys who are truly deserving."

While the Bobcats were celebrating, the Cavaliers’ slim playoff hopes suffered yet another damaging loss despite a career-high 44 points from Kyrie Irving. Cleveland (31-47) trails eighth-place Atlanta by 3 1/2 games for the final playoff spot in the East.

The Bobcats have made significant progress since finishing 7-59 in the lockout-shortened 2011-12 season. Charlotte was 21-61 last season.

"Words can’t describe it," guard Kemba Walker said. "For me, Gerald (Henderson), and Biz (Bismack Biyombo), we were the original guys here. We were on the worst team my first two years, so to go from there to here, it’s like night and day."

Henderson’s basket gave Charlotte a 90-89 lead with 1:08 remaining and the Bobcats made four free throws down the stretch to seal the win. Walker scored 20 points and Henderson added 15 for the Bobcats, who have won four straight and swept the four-game season series with Cleveland.

"This means a lot, individually and as a team," Henderson said. "I thought we would be good, but I think we’ve exceeded everybody’s expectations -- even our own."

Irving, who defended himself before the game over reports he’s unhappy in Cleveland, was 16 of 31 from the field, including five 3-pointers. He added eight assists and seven rebounds.

The Cavaliers could be eliminated from contention before they play again Wednesday. Irving admitted he’ll be paying attention to what Atlanta and New York -- the teams ahead of Cleveland -- are doing.

"In this game, anything can happen," he said. "I know the Knicks and Hawks play some pretty tough teams coming up. I’ll definitely be watching. We’ll see."

Walker’s 3-pointer with 32 seconds remaining in regulation gave Charlotte an 82-80 lead, but Irving’s jumper 7 seconds later tied the game.

Irving’s basket gave Cleveland an 89-86 lead with 1:55 remaining in overtime, but Jefferson hit a free throw and Henderson’s basket put the Bobcats ahead.

Following a Cleveland turnover, Walker missed a jumper, but Cody Zeller got the rebound and passed it out to Walker, who was fouled and made both shots with 17 seconds remaining to make it 92-89.

After Dion Waiters sank two free throws, Walker split a pair of foul shots with 11 seconds to go. Following a time out, Irving took the inbounds pass at the top of the key, but his wide-open 3-pointer rimmed out.

"That’s as good a look that I had all night," he said. "It was in and out. It was a crucial miss, (but) I can live with that."

Henderson’s two free throws with 7 seconds left gave the Bobcats a 95-91 lead.

Spencer Hawes made a 3-pointer with 4 seconds to get the Cavaliers within one before Jefferson hit a free throw with 2.3 seconds left. He missed the second, but the Cavaliers had no timeouts remaining and Hawes’ desperation full-court heave was short.

NOTES: Charlotte has defeated Cleveland five straight times. ... Bobcats assistant coach Mark Price, who starred for the Cavaliers from 1986-95, got a big ovation when he was shown on the scoreboard in the second quarter. ... The Bobcats are 3-14 all-time at Quicken Loans Arena, the worst record by a visiting team at the 20-year-old arena.