The Dallas Mavericks shocked the New York Knicks at American Airlines Center on Thursday, ending a five-game win streak for New York and spoiling a possible revenge game for Jalen Brunson.

Kyrie Irving scored a season-high 40 points to lead Dallas to the 128-124 win.

“The basketball gods, they had our back,” Irving said. “We were playing extremely well throughout the majority of the game. Then those final four or five minutes, they start hitting some corner threes … and they’re pushing the pace, and our lead goes from 12 to 2 or whatever.”

“These are the games when you’re being tested. So I think we grew tonight as a team,” he said.

The Knicks entered the contest heavily favored over the Mavs, who were without Luka Dončić and two other starters, but early struggles for New York and outstanding performances by Irving, Tim Hardaway Jr., and Josh Green, who was tasked with guarding Brunson most of the game, put the game to bed. Hardaway accounted for 32 points, while Green hit 18, including a clutch three-pointer with just 25 seconds remaining on the clock, giving the Mavs a 124-120 lead.

Fouls against Irving and Hardaway in the final 11 seconds led to four more points and secured one of the biggest wins for Dallas this season.

The much-heralded return of Brunson, who departed from Dallas in 2022, added fuel to the fire for the Mavs. Brunson scored 30 points, but his teammates consistently missed shots early. The Mavs’ defenders showed the type of hustle needed to collect rebounds, including a series of three that led to Green’s three-pointer.

“To come up with the three offensive rebounds at that point was huge,” coach Jason Kidd said. “And for Josh to get another shot at it from the slot, he didn’t hesitate. I thought he did a great job at both ends. I thought he started us off with the physicality of guarding Brunson. It’s not easy. And again, there was no hesitation when the ball found him.”

Next up for the Mavericks (23-16): Saturday, January 13, against the New York Pelicans (23-16) at 7:30 p.m. CT.