DETROIT (AP)The Detroit Pistons and Bojan Bogdanovic have agreed on a $39.1 million, two-year contract, according to a person familiar with the deal.

The person spoke to The Associated Press on condition of anonymity Sunday night because the agreement had not been announced.

Detroit acquired Bogdanovic from Utah last month and saw enough from him early this season to offer a deal that keeps him under contract through the 2024-25 season.

Bogdanovic was averaging a team-high 23 points entering Sunday’s game against the Golden State Warriors. He made 24 3-pointers in his first six games, a team record that Hall of Famer Joe Dumars set by making 21 shots beyond the arc in the first six games of the 1996-97 season.

Bogdanovic, who is from Bosnia-Herzegovina, has averaged 15.1 points is his career. Miami drafted him with the No. 31 overall pick in 2011 and he played professionally in Turkey before making his NBA debut with the Brooklyn Nets during the 2014-15 season. He also played for Washington and Indiana before going to Utah.

Bogdanovic averaged 18.1 points for the Jazz last season in 69 games, all of them starts, in his third year with the team.

Detroit didn’t have to give up much to get him the cost-cutting Jazz, sending single-digit scoring players Kelly Olynyk and Saben Lee in exchange for Bogdanovic.

The franchise is building around savvy guard Cade Cunningham, the No. 1 pick overall last year, dynamic guard Jade Ivey, the fifth pick this year, and explosive rookie center Jalen Duren.

The Pistons are hoping Bogdanovic, a veteran scorer who is willing to lead young players, can help speed up their rebuild. They were 23-59 last season, finishing ahead of just Houston and Orlando at the bottom of the NBA.

Detroit hasn’t won a playoff series since 2008, when it advanced to the conference finals for the sixth straight year during a stretch that included its third NBA championship in the first of two straight trips to the NBA Finals.

Follow Larry Lage at https://twitter.com/larrylage

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