CHICAGO (AP) — Zach LaVine scored 39 points and hit the go-ahead layup in the closing seconds to lead the Chicago Bulls to a 108-107 victory over the Philadelphia 76ers on Wednesday night in a game that featured two endings.

CHICAGO, ILLINOIS – MARCH 06: Zach LaVine #8 of the Chicago Bulls is fouled by Jonah Bolden #43 of the Philadelphia 76ers at the United Center on March 06, 2019 in Chicago, Illinois. The Bulls defeated the 76ers 108-107. NOTE TO USER: User expressly acknowledges and agrees that, by downloading and or using this photograph, User is consenting to the terms and conditions of the Getty Images License Agreement. (Photo by Jonathan Daniel/Getty Images)

LaVine scored 13 in the fourth quarter as the Bulls wiped out a 10-point deficit on their way to one wild victory.

They trailed 107-106 after Jimmy Butler hit two free throws for Philadelphia with 4.8 seconds remaining. After a timeout, LaVine inbounded to Robin Lopez and got fouled as he cut past Mike Scott for the go-ahead layup with 1.6 seconds remaining.

LaVine missed the free throw, but the Bulls came away with the win after one more twist. He broke up Ben Simmons’ inbounds pass to Butler underneath the 76ers’ basket. Both teams walked off the court and fans started to file out of the arena. The problem was, the horn sounded before anyone touched the ball.

After a review, the referees put 0.5 seconds back on the clock. But with one more chance, Philadelphia came up short when the inbounds pass skipped off Butler’s hands.

It was a sour finish for the former Chicago star who scored 22 points in his second game against his former team. Simmons had 18 points, 11 rebounds and seven assists. But the 76ers fell a game behind Toronto for third place in the Eastern Conference. They are 4-3 since the All-Star break, with All-Star center Joel Embiid sidelined by a sore left knee.

LaVine made 14 of 26 shots. Lopez added 19 points as the Bulls snapped a two-game skid.

Copyright 2019 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.