Photo: Toronto Raptors/Twitter

Free agent guard Gary Trent Jr. has agreed to remain with the Milwaukee Bucks after reaching a new four-year, $64 million contract, according to ESPN.

The agreement comes after several weeks of negotiations between the Bucks and Trent’s representatives, which began shortly after the NBA Finals concluded in mid-June.

During that time, the two sides also explored potential sign-and-trade scenarios involving other interested teams.

Despite outside interest, Milwaukee and Trent ultimately reached an agreement to continue their partnership, with discussions progressing toward a deal on Saturday.

The new contract keeps one of the Bucks’ key backcourt players in Milwaukee on a long-term deal as the franchise continues shaping its roster for the future.