James Harden is convinced RJ Barrett will have the opportunity to become an NBA great after the rookie inspired the New York Knicks to a surprise win over his Houston Rockets side.

Barrett put up 27 points, his joint-season high, as the Knicks ended the Rockets' six-match winning streak in a 125-123 success at Madison Square Garden on Monday.

Rockets superstar Harden, who top-scored with 35 points, is impressed by what he has seen from the Knicks guard.

"Aggressive," Harden said of Barrett's performance in quotes reported by ESPN. 

"I like that, especially for a rookie. Not timid at all, and when you're aggressive and confident in your game, you look good out there. 

"Want him to continue to build his confidence and keep being aggressive and have the opportunity, which he will, to be great."

The Rockets fell to a 21-point deficit in a slow start and were 10 down by the end of the third quarter.

Harden, who was perfect with 16 of 16 from the free-throw line, and Russell Westbrook (24 points, nine rebounds) did their level best to drag the Rockets back into contention.

But Barrett, a right-hander, produced a moment of magic with just under eight seconds remaining with a left-handed lay-up on the drive over P.J. Tucker.

"I just took the shot that came," Barrett said. "I like going left. That was kind of, in that situation, you're not really thinking about it. You're kind of just playing."

Westbrook lamented the Rockets' slow start, saying: "We should've never put ourselves in that position because it takes a lot of energy to fight back. Especially on the road.

"We can't take games like this lightly. This is the NBA, everybody is going to go out and compete and we have to be ready to play."

Harden added: "We weren't consistent with our defensive principles throughout the course of the game and we paid for it. Simple."

The Rockets are fourth in the Western Conference with a 39-21 record, while the Knicks (19-42) remain a lowly 13th in the East.