CHICAGO (AP)The Chicago Bulls made it clear re-signing Zach LaVine and locking in the two-time All-Star and Olympic gold medalist for years to come was their top offseason priority.

It is officially a done deal.

The Bulls announced Thursday they re-signed LaVine, after the high-flying guard agreed to a five-year max contract worth about $215 million last week.

LaVine had said he wanted to explore the market as an unrestricted free agent for the first time after eight seasons in the NBA and five with the Bulls. If he went shopping, it was a quick trip. He announced his decision about 18 hours after the free-agent negotiating period began.

”We are pleased that Zach remains with the Bulls. His work ethic and character have helped him to become one of the top players in the NBA,” executive vice president of basketball operations Arturas Karnisovas said in a statement. ”We look forward to more great things from Zach, as he helps lead our team, both on and off of the court.”

LaVine’s arrival from Minnesota as part of a 2017 draft-night trade that sent Jimmy Butler to the Timberwolves kicked off a rebuilding effort by the previous management regime of John Paxson and Gar Forman. His decision to stay means a core that led Chicago to the playoffs for the first time in five years remains intact.

LaVine averaged 24.4 points in the final season of a four-year, $78 million deal. He made the playoffs for the first time, with the Bulls losing in the first round to Milwaukee in five games.

It wasn’t an easy season for LaVine. He dealt with a thumb injury early on and was in and out of the lineup the final few months because of a left knee injury that required frequent treatment and, ultimately, arthroscopic surgery in May.

But Chicago took a huge step, winning 46 games with LaVine, DeMar DeRozan and Nikola Vucevic leading the way. The Bulls enjoyed their best record in seven years and will try to build on that in the upcoming season.

Besides keeping LaVine, they added depth in the backcourt and up front by agreeing to deals with veteran guard Goran Dragic and Andre Drummond to help the team take another step.

The 36-year-old Dragic agreed to a $2.9 million, one-year contract last week. The team had not announced that deal as of Thursday evening.

Dragic averaged 13.7 points and shot 36.2% on 3-pointers over 14 seasons with Phoenix, Houston, Miami, Toronto and Brooklyn. From Slovenia, he made an All-Star team with the Heat during the 2017-18 season and helped them advance to the 2020 NBA finals.

Dragic averaged 7.5 points while shooting 25.4% from beyond the arc last season for Toronto and Brooklyn. Though the Bulls ranked fourth in the NBA in 3-point accuracy, they were last in attempts.

The Bulls announced Drummond’s signing on Wednesday.

The two-time All-Star and four-time rebounding champion had a strong second half for Brooklyn last season after being traded in the deal that sent James Harden to Philadelphia, averaging 11.8 points and 10.3 rebounds in 24 games for the Nets. Drummond has averaged 13.8 points and 13.3 rebounds over 10 seasons with Detroit, Cleveland, the Los Angeles Lakers, Philadelphia and Brooklyn.

The Bulls also signed first-round draft pick Dalen Terry as well as Javon Freeman-Liberty and Justin Lewis on Thursday.

More AP NBA: https://apnews.com/hub/nba and https://twitter.com/AP-Sports