MILWAUKEE — For eight years, Giannis Antetokounmpo and Khris Middleton have built a bond inside a cocoon, experiencing growing pains and early triumphs in an NBA market better known for its beer and sausages.

While Giannis has blossomed into a first-name superstar, Middleton — the Robin to Antetokounmpo’s Batman— may still need a name tag outside Milwaukee’s city limits. But in the NBA Finals when players become legends, the longtime teammates equally created their own unforgettable moments in the Milwaukee Bucks’ 109-103 win.

The tag team effort played to the duo’s strengths. Middleton, a low-key mainstay who typically butters his bread with midrange jumpers, finished the play that turned the game and had Antetokounmpo celebrating in the closing moments. After a Jrue Holiday steal, Middleton’s fast-break layup with 27.2 seconds remaining put the Bucks up four and was part of 10 consecutive points from the eighth-year forward.

“I think it’s always a Khris Middleton kind of night,” Pat Connaughton said in praise of his teammate.

Antetokounmpo, the two-time MVP who could be the league’s best defensive player in any given year, finished with 26 points, 14 rebounds and eight assists, but his block on Deandre Ayton’s alley-oop attempt with 1:14 remaining saved the Bucks’ slim lead.

“Giannis just made a spectacular block. A spectacular play. . . . That’s an NBA Finals special moment right there,” Bucks Coach Mike Budenholzer said.

The Bucks’ win tied the series at 2-2, sending the Finals back to Phoenix for Saturday night’s Game 5, despite a 42-point performance from Devin Booker.

Booker spent Game 3 in a defensive vice, struggling to score while bumping against P.J. Tucker’s bulky body or dodging Middleton’s length. He finished that night with only 10 points. On Wednesday, however, Booker had doubled that output by halftime.

“He’s hitting contested, tough shots. I think we just got to keep making him work for everything,” Budenholzer said. “He’s a heck of a player. Bounce-back game for him, which is what we expected.”

Booker took on any Bucks player who dared to defend. He executed a left-handed scoop shot over 7-foot center Brook Lopez though he felt he had been fouled. He later took Connaughton baseline, spun and then hit an off-balance jumper. Though Milwaukee could not match Booker’s breakout, a three from Middleton evened the score at 52 before the break.

As Booker carried the Suns through the first half, Antetokounmpo played a secondary role. He took fewer shots than both Middleton and Holiday and at times, displayed signs of fatigue — the sight of Antetokounmpo falling and remaining on the floor longer than expected, his chest rising and falling to take in air, can induce anxiety in Milwaukee.

But Antetokounmpo’s energy level was not as concerning for the Bucks as trying to find an answer for Booker. After intermission, however, Milwaukee finally found a way to cool him down. Around the 5:53 mark, Booker picked up his fourth personal foul and had to return to the bench.

When Booker took a seat, Phoenix led 65-62. But with Booker on the bench, the Suns fell behind 70-69. It didn’t take long for Coach Monty Williams to overlook Booker’s four fouls and send his all-star back into the game.

Less than two minutes into the fourth, Booker again couldn’t escape the whistle. Called for his fifth foul after pushing Tucker out of bounds, Booker angrily left the court, kicking a folding chair on his way to the sideline. Milwaukee took advantage of Booker’s absence, cutting into a nine-point deficit, but unlike before the Suns’ depth filled the scoring void. Chris Paul, Cam Johnson and Jae Crowder all contributed during the five minutes with Booker on the bench, helping Phoenix maintain its slim lead.

But with the score tied with less than two minutes to play, the Bucks turned to their stars. After Middleton’s layup extended the lead to four, Antetokounmpo remained at the end of the court, clutching his shorts and pumping his fist. A previous postseason experience — one that ended in defeat — had told Antetokounmpo everything he needed to know about Middleton. He watched his teammate compete and fight until the end, and Antetokounmpo knew he had found a kindred soul.

“That’s the dude I want to build a legacy with,” he said.

In Game 4, the pair did just that.

— Candace Buckner

Read highlights of Game 4 below.

Read more from The Post: