Jayson Tatum nailed a go-ahead bank shot from deep with 1.5 seconds remaining as the Boston Celtics survived blowing a 17-point, fourth-quarter lead to stun the visiting Milwaukee Bucks 122-121 Wednesday night in both teams’ season opener.

Tatum’s clutch shot capped a 30-point night, but the Bucks had a chance to tie when Giannis Antetokounmpo was fouled on the inbound pass with 0.4 seconds remaining. Antetokounmpo made his first free throw before coming up short on the second, sealing the result.

Jaylen Brown led the Celtics with 33 points while Jeff Teague added 19 off the bench in his team debut. Fellow newcomer Tristan Thompson scored 12.

Antetokounmpo scored 18 of his game-high 35 points in the fourth to go with 13 rebounds, and Khris Middleton had a 27-point, 14-rebound double-double. Prized offseason acquisition Jrue Holiday added 25 points.

Despite the end result, Antetokounmpo, who inked a five-year, $228 million supermax contract extension last week, led his team back from a 101-84 deficit to begin the fourth. The Bucks opened the quarter with a 13-4 run to close the gap to 105-97, and Antetokounmpo scored Milwaukee’s next 10 points, trimming the deficit to two. A Brook Lopez tip-in with 4:22 remaining knotted the score at 113.

Antetokounmpo put the Bucks ahead 115-113 with 3:26 left, but Tatum had the Celtics back up 119-117 on a fadeaway with 1:24 to go. Holiday’s 3-pointer at 1:10 made it 120-119 Milwaukee, and the game remained scoreless until Tatum’s game-winning bucket.

The Celtics outscored the Bucks 37-25 in the third, riding a 20-8 stretch midway through the quarter to grab the game’s first double-digit lead at 86-76. Teague hit back-to-back 3-pointers to end the spurt. Tatum scored the team’s final eight points, as Boston upped its advantage to 17 by quarter’s end.

The Celtics erased a nine-point deficit with a 10-0 run midway through the second. Brown went off in the final 2:32, scoring 10 points to give Boston a 64-59 edge at the break.

The Bucks led 34-31 after one.