Getty Images

The New York Knicks extended the NBA's second-longest active winning streak to eight with a wild 122-120 victory over the Miami Heat on Friday night, and Julius Randle was the hero. 

But first, he was nearly the goat. 

With the Knicks up one and under 30 seconds to play, Randle had his pocket picked by Tyler Herro, who raced into the front-court and made a strong move to his left for a tough finish to give Miami the lead as a chaotic sequence ensued. 

Coming back the other way against a dwindling clock, Randle was nearly picked again, with Jimmy Butler this time knocking the ball away. But Randle had just enough time to recover possession and launch up a desperation 3-pointer that went down with seven-tenths of a second remaining. 

Here's the crazy sequence in its entirety. 

After calling a timeout, the Heat were unable to get up a shot on the other end as Kevin Love's inbound pass was knocked away. It was just a crazy win for a Knicks team that is fast becoming one of the league's more exciting squads. New York now has recorded two separate eight-game win streaks this season and will attempt to make it nine against the Celtics in Boston on Sunday night. 

This marks the second time in franchise history that the Knicks have had two win streaks of at least eight games in the same season. The last time was 1972-73, the last time the Knicks won the championship. 

Randle finished with 43 points, his fourth 40-plus outing of the season. With 46 points on February 24 at Washington, Randle is the first Knicks player since Carmelo Anthony in 2014 to top the 40-point mark in two consecutive road games, per ESPN Stats. 

Randle made eight of his 13 3-pointers on Friday. In his five games since the All-Star break, he is cooking to the tune of 32 points a night on 54-percent shooting, including 50 percent from 3 on just under 11 attempts per game. 

With the win, the Knicks maintain the East's No. 5 seed, just one game back of the No. 4 Cleveland Cavaliers with 17 games remaining.