NEW YORK -- Miami forward LeBron James wanted to make sure there was no carry-over from one of the Heat's worst losses of the season, so he took over the beginning and the end of a 106-91 win over the New York Knicks on Saturday night.

James had 30 points, eight rebounds, seven assists and six steals as the Heat (33-13) won for the sixth time in their last eight games.

Miami had lost to Oklahoma City 112-95 in its previous game on Wednesday.

James made sure there were no lingering effects from that lost, scoring or assisting on 21 of Miami's 29 first-quarter points. He closed the game with eight fourth-quarter points.

"I didn't like our performance against OKC (Oklahoma City), especially in the second half, so I took it upon myself to hold myself and the team more accountable," James said. "It's always great when you can put in the work in the film session and translate that into a game situation.

"I'm happy we were able to come up with a great win."

Miami guard Dwyane Wade tossed in 22 points for the Heat, who avoided going 0-4 in New York this season after losing in Madison Square Garden earlier this month and both games in Brooklyn.

Forward Carmelo Anthony led the Knicks (19-28) with 26 points and shooting guard J.R. Smith deposited 20 points. Rookie guard Tim Hardaway Jr. came off the Knicks bench to score 17 points.

The loss matched the Knicks' total from last season when they went to the Eastern Conference quarterfinals. New York finished its eight-game homestand at 4-4.

A breakaway dunk and fadeaway jumper from James on successive possessions in the four quarter gave the Heat their largest lead, 96-71, of the second half.

Miami's defense limited the Knicks to 13 shots from the field in the fourth quarter.

"We talked about getting the loose balls and cleaning up the glass, holding them to one shot and executing," Heat coach Erik Spoelstra said. "It was good to see that poise down the stretch."

The Knicks were without their top defensive player, guard Iman Shumpert, who missed his second straight game with a sprained shoulder.

"We can match (Shumpert) up with either Wade or LeBron and not having him tonight hurt," Knicks coach Mike Woodson said. "But I thought our guys battled and LeBron was LeBron."

The Heat led throughout the third quarter and ended it with five free throws from forward Chris Andersen in the last 1:15 for a 77-71 advantage.

New York outscored the Heat 6-2 in the last 2:09 of the second quarter to cut the Miami lead to seven points at 53-46 at the half. Miami had led by as many as 12 points in the quarter.

Hardaway had a difficult time guarding James in the second quarter. The rookie guard picked up his third foul with 3:24 left in the quarter when he fouled James on a driving layup. James converted for a three-point play to put the Heat ahead 50-38.

The lead changed hands seven times in the first quarter before the Heat used a 10-2 run in the final 3:28 to emerge with a 29-22 advantage.

Forward Shane Battier, who was out with an injury when the Heat lost to the Knicks on Jan. 9, contributed 11 of his season-high 16 points in the first quarter, nailing three of his four 3-pointers in the game.

"He (Battier) came out with an aggressive mindset, not only defensively, but offensively," James said.

NOTES: The Heat have allowed 15 opponents to shoot 50 percent or better from the field this season. ... The Knicks shot 49.3 percent. ... F Amare Stoudemire returned for the Knicks after missing seven games with a sprained left ankle, scoring two points in 4:26. ... Knicks F Carmelo Anthony averaged 28.7 points and nine rebounds in January. ... Anthony is third in the league this season in first quarter scoring, averaging 8.1 points per game. He scored four points in the first quarter against the Heat. ... Miami G Dwayne Wade has now recorded 687 career blocked shots, third most by a guard in league history. ... Among the celebrities at courtside were actor Hugh Jackman, comedian Rickey Gervais, international soccer star David Beckham and former heavyweight champion Evander Holyfield.