As the clock wound down inside the final minute of the first overtime of Friday night’s thriller between the Nets and Heat at Barclays Center, Shaun Livingston found himself matched up one-on-one against LeBron James while the Nets clung to a 91-89 lead.

It’s a position that would have been unthinkable as recently as Dec. 23, 2012, when he was waived by the Wizards, or even when the Nets signed him as a free agent back in July to be Deron Williams’ understudy.

But not only did Livingston find himself in that position, he capitalized on it, baiting James into a charge that gave the world’s best player his sixth and disqualifying foul, sending him to the bench and helping ensure the Nets would leave their home floor with a 104-95 double-overtime victory over the two-time defending champions in front of a sellout crowd of 17,732.

“I was just trying to make him uncomfortable,” Livingston said afterward. “He’s a rhythm player. He can get to any spot on the court … pull-up, shoot the 3. He can do it all.

“But, in that situation, he would have been going to the rim, so [I was] just trying to bait him a little bit into driving and just try to beat him to the spot. If they’d called a block, it would have been good [defense] either way.”

The officials didn’t call a block, however, and sent James to the bench after 49 ordinarily spectacular minutes for the four-time league MVP, who finished with 36 points, seven rebounds and five assists as the Heat fell to 0-3 against the two New York teams — and 0-2 against the Nets, with both losses coming in Brooklyn.