Knicks guard Jalen Brunson passes the ball against Golden State...

Knicks guard Jalen Brunson passes the ball against Golden State in the first half of an NBA game at Madison Square Garden on Sunday. Credit: Kathleen Malone-Van Dyke

Steve Kerr jokingly opened his pregame news conference at Madison Square Garden by telling reporters that he had cooked up a revolutionary scheme that would perplex Knicks coach — and former Golden State assistant — Mike Brown.

It turned out that the Xs-and-O’s Kerr alluded to were actually just playing with relentless energy and the kind of desperation only a team that had lost four in a row was capable of, but it proved effective while it lasted. Golden State led at the half, out-hustling a Knicks team that sleep-walked through the first 24 minutes.

However, Jalen Brunson had 30 points and nine assists, and the Knicks rallied from a 21-point deficit against a patchwork Golden State lineup to win, 110-107, on Sunday night.

Karl-Anthony Towns had 17 points and 12 rebounds for the Knicks, while OG Anunoby and Jordan Clarkson both had 14 points. The Knicks took a while to wake up in their return home from a five-game road trip before eventually picking up their third straight victory.

The Knicks led briefly in the opening minutes of the game and then not again until the final minutes of the third quarter after back-to-back baskets by Brunson.

Brandin Podziemski scored 25 points for  Golden State, who had Stephen Curry and most of their recognizable names on the bench in their season-high fifth straight loss.

Quentin Post had a career-high 22 and Gui Santos finished with 20.

Golden State had eight players out. Curry missed his 17th straight game with right knee pain and inflammation. Younger brother Seth Curry is out at least a week with a left groin strain and veteran forward Al Horford has a left calf strain that will also sideline him at least a week.

Golden State also rested Draymond Green, Kristaps Porzingis and De’Anthony Melton on the first night of back-to-back games, hoping they will be available Monday in Washington.

Golden State used its 11th different starting lineup in the last 11 games and 34th of the season.

But Golden State led 35-21 after one quarter and extended it to 46-25 on Post's follow shot with 9 1/2 minutes remaining in the half.

The Knicks cut it to 54-45 at the break. Golden State wouldn't go away even after the Knicks surged ahead, but turned the ball over without being able to get a final shot after Anunoby's free throws with 6.2 seconds left.

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 6 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME