CHICAGO — The Chicago Bulls struggled for long stretches. They looked fatigued at times on the second night of back-to-back games. And they found a way to win anyway.

Kris Dunn scored 17 points, including two clutch free throws in the final seconds, and the surging Bulls rallied to beat the New York Knicks 92-87 on Wednesday.

Chicago trailed by as many as 15 in the first half, but shut down New York down the stretch of its ninth win in 11 games. The Knicks managed just three points in the final 5 1/2 minutes.

Lauri Markkanen scored 12 points for the Bulls (12-22), who were coming off a 115-106 win at Milwaukee. Justin Holiday and Robin Lopez had 11 points apiece.

“I did think we hung in there,” Bulls coach Fred Hoiberg said. “We spent a lot of energy (Tuesday) night. I don’t think we came out with great energy, our focus wasn’t great, we were turning the ball over. We did things we had not been doing.”

Kristaps Porzingis led the Knicks with 23 points, and Courtney Lee had 17. New York (17-17) has dropped three straight.

Porzingis, guarded mostly by Markkanen, was shut out after he made a jumper with 6:58 left.

“We got content to walking it up the court,” New York coach Jeff Hornacek said. “We weren’t able to get into easy early stuff. Instead we were setting up, they were switching and we were spending too much time looking for KP and then the shot clock would start going down.”

The Knicks led for most of the night before Holiday hit a corner 3-pointer that tied it at 86 with 3:01 left.

Neither team scored for the next two-plus minutes before Dunn found Markkanen ahead of the field for a dunk.

New York’s Jarrett Jack was fouled with 8.5 seconds left and had a chance to tie it, but converted just 1 of 2 free throws. Dunn was fouled with 7.8 seconds to go and made both for a 90-87 lead.

Following a timeout, Enes Kanter’s 3-point attempt missed badly and bounced out of bounds. Holiday then iced the game with a pair of free throws.

The Bulls posted a 104-102 victory in the first meeting between the teams on Dec. 9 at the United Center, with Dunn hitting a pair of free throws with 2.9 seconds left.

“There are gonna be games that are ugly, but it all comes down to stops,” Dunn said. “We take pride in our defensive stops. I think we’re very resilient.”

OFF NIGHT

Chicago forward Nikola Mirotic was held to just four points. He averaged 18.5 points in the previous 10 games.

FRENCH CONNECTION

New York rookie Frank Ntilikina has had Thursday night’s game at San Antonio circled since the schedule came out. It will be his first opportunity to meet countryman Tony Parker.

“He’s the best French player in history, so it’s going to be challenging to play against him,” Ntilikina said.

TIP-INS

Knicks: F Doug McDermott made his first start of the season and finished with three points in 37 minutes. F Lance Thomas had started 10 games with Tim Hardaway Jr. sidelined with a stress injury of the lower left leg. … C Joakim Noah was inactive for the second time in the last four games. The former Bull also was inactive for the Dec. 9 game.

Bulls: With his performance at Milwaukee on Tuesday, Dunn joined Michael Jordan as the only Bulls player with at least 20 points, 12 assists, four steals and two blocks in a game. Only 18 players total have amassed that stat line in an NBA game. “It was good to see him bounce back after probably his toughest game of the season in Boston (on Saturday) where he was 1 for 12,” Hoiberg said. “It didn’t rattle him that he had a tough night in Boston.”

UP NEXT

Knicks: Visit San Antonio on Thursday night.

Bulls: Host Indiana on Friday night.