MILWAUKEE (AP) — Damian Lillard made big shots down the stretch and Brook Lopez blocked shots on the other end of the floor all night.

Lillard scored 30 points and hit a go-ahead 3-pointer with 1:03 left as the Milwaukee Bucks outlasted the New York Knicks 110-105 on Friday to open the inaugural In-Season Tournament. Lillard converted his clutch basket off a handoff from Giannis Antetokounmpo, who had 22 points, eight rebounds and six assists.

“We’re trying to learn each other,” Lillard said of himself and his new teammate, a two-time NBA MVP. “We’re trying to figure out ways to play off of each other and figure out what works for each other.”

The Bucks withstood a 45-point performance from New York guard Jalen Brunson, three points off his career high.

Lopez had eight blocks while showcasing the form that made him the runner-up in last season’s NBA defensive player of the year voting. He had totaled just two blocks in Milwaukee’s first four games as new Bucks coach Adrian Griffin tried out different defenses that didn’t have the 7-footer around the basket as often as usual.

That changed Friday as Lopez was back in rim-protection mode. Griffin said “sometimes as coaches, we are too smart for our own selves” and noted he altered his strategy at the suggestion of a couple of players after a 130-111 loss at Toronto on Wednesday.

“I was smart enough to listen to them, and it paid off tonight,” Griffin said. “It was tough because you have to give up something — Brunson and his mid-range — but there were a lot of tough 2s. But it allowed us to stay home and protect the 3-point line. Brook did the rest. He was phenomenal.”

Lopez thanked his new coach for being willing to adjust.

“Obviously, I was very appreciative of that,” said Lopez, who scored 13 points. “I think we have a lot of guys that are very coachable. To have a head coach who’s willing to listen in that regard and talk those things out, that’s great.”

The huge performances by Lillard and Lopez almost weren’t enough. Milwaukee led by 14 in the third quarter, but that margin shrank in the final period as the Bucks went nearly seven minutes without a basket.

Brunson gave the Knicks their first lead since early in the second quarter by hitting a 3 with 1:10 remaining. He punctuated the shot by blowing a kiss to the crowd.

Although he shot just 2 of 8 from 3-point range, Brunson was 17 for 30 from inside the arc and 9 of 11 on free throws.

“He can make 3s, but he doesn’t settle for 3s,” Lillard said. “He draws fouls. He knows how to position himself in front of the defender. He puts the defender in tough positions, to where you almost, you have to foul. You’re trying to defend hard like you’re taught to, and he’s having you at his mercy.”

Lillard responded to Brunson’s big basket by sinking a 3-pointer of his own to put Milwaukee back ahead for good at 104-103.

After Brunson missed a 10-footer with 49 seconds left, Khris Middleton found Lillard cutting to the basket for a driving layup to start a 3-point play that made it 107-103 with 38 seconds to go.

Lopez then delivered his final block of the night and made one of two free throws with 17.8 seconds remaining. Brunson’s driving layup cut Milwaukee’s lead to 108-105 with 8.8 seconds left, but Lillard sealed the victory by hitting two free throws with 6.4 seconds to play.

“Hard-fought (game), but we didn’t do enough to get it done at the end,” Knicks coach Tom Thibodeau said. “We’d better come back with more determination.”

The Knicks played without RJ Barrett for a second straight game due to a sore knee.

The Bucks and Knicks are in East Group B of the tournament along with Charlotte, Miami and Washington. All the teams in the group will play one another this month as part of their usual regular-season schedules.

The tournament’s six group winners and two wild-card teams advance to quarterfinal matchups Dec. 4-5.

UP NEXT

Knicks: At Washington on Nov. 17 in their next In-Season Tournament game. Host the Los Angeles Clippers on Monday in a regular game.

Bucks: At Charlotte on Nov. 17 in their next In-Season Tournament game. At the Brooklyn Nets on Monday in a regular game.