Knicks guard Jalen Brunson pulls up for a shot against Cavaliers...

Knicks guard Jalen Brunson pulls up for a shot against Cavaliers forward Mamadi Diakite and guard Donovan Mitchell during the first quarter at Madison Square Garden on Sunday. Credit: Brad Penner

A star attraction comes into Madison Square Garden with the visiting team for almost every Knicks home game. Giannis Antetokounmpo was here Wednesday and Luka Doncic dominated the Garden on Saturday.

But perhaps no visiting star arrived this season with quite the combination of fear for the hometown fans and regret for the Knicks as when Donovan Mitchell and the Cavaliers hit the Garden on Sunday night.

Mitchell was the one star the Knicks’ front office believed would be theirs, available on the trade market in the summer with the Knicks a seemingly perfect fit. They were the team he wanted to join after growing up in Westchester County and the Knicks were stocked with the sort of package that the Jazz wanted in return for the high-scoring guard. But when the Knicks hesitated, Cleveland swooped in and landed Mitchell.

The Knicks may regret not improving upon their offer for him, but for one night, when they desperately needed it, they got the better of him, hanging on for a 92-81 win over the Cavaliers.

After scoring 38 points in his first game against the Knicks earlier this season, Mitchell finished with 23 points and 8-for-22 shooting, including 2-for-11 from beyond the arc. And Jalen Brunson, the biggest acquisition the Knicks did make during the summer, finished with 23 points to lead the Knicks (11-13). They snapped their home losing streak at five games and dropped the Cavaliers to 15-9.

“What’s done is done, and I’m happy as hell to be where I’m at,” Mitchell said. “At the end of the day, this decision was made and I don’t think I’ve been happier since I’ve been in the league. But I think for me it’s always going to be motivation to come back and play well in my hometown, but you could say that about anybody. But with what happened this summer, it’s over with, it happened and I’m happy to be with the Cavaliers.”

One of the players the Knicks opted not to include in a potential deal for Mitchell — Quentin Grimes — provided a defensive effort unlike the teams’ first meeting early in the season in Cleveland. While he didn’t shut down Mitchell, he certainly provided a better challenge than the Knicks had put up the first time they saw him. In that game, Mitchell dominated from the start, recording 15 points and five assists in the first quarter with RJ Barrett and Evan Fournier taking turns trying to slow him down.

This time Grimes got the assignment and Mitchell shot 1-for-6 in the first quarter — and that only basket came on a switch when none of Grimes’ teammates opted to pick up Mitchell alone in the left corner.

“I knew that was going to be a big matchup with everything that happened this summer,” Grimes said. “Come in focused. That’s one of the best players in the NBA. Had to stay locked in, and I feel like I did a good job on him today and we came out with a win.”

While the third quarter has been the worst for the Knicks this season based on statistics as well as the eye test — with the 41-15 disaster Saturday against Dallas just the latest example — this time the Knicks held fast after intermission.

With an 18-point lead whittled down to three at halftime, the Knicks got a boost from Barrett. He shook off a 1-for-8, five-turnover first half to score 12 points in the third quarter as the Knicks built the lead to eight heading into the fourth period.

“I’ll be honest with you,” Brunson said. “We needed a win. I think for us, how we responded when they cut that lead in the first half, starting the third quarter well, it’s all signs that we’re moving in the right direction. We can’t just be satisfied with what we did tonight. It’s not going to roll over and it’s not just going to happen in our next game. We have to make it happen. We have to continue to create habits that make us do that.’’

The Knicks went ahead by 13 in the fourth quarter and still held a 10-point advantage with less than five minutes to play, but the Cavaliers cut it to six and had the ball when Kevin Love was whistled for a travel. Then Mitchell Robinson was called for one on the other end and Tom Thibodeau was hit with a technical foul. Mitchell converted it to close the gap to 84-79.

With the Knicks up 86-81, Brunson hit a baseline jumper and then fed Randle inside for a layup and a nine-point edge. Mitchell then was called for a travel — one of 13 in the game, an NBA high this season.