Nearly a month after free agency began, Brandon Jennings has a new home.

Sources close to the situation told ESPN.com on Tuesday that the Detroit Pistons have agreed to a sign-and-trade deal that will net Jennings, a restricted free agent, a new three-year contract worth in excess of $25 million.

The Bucks will receive guard Brandon Knight, forward Khris Middleton and center Viacheslav Kravtsov, two sources told ESPN The Magazine's Chris Broussard.

ESPN.com first reported Tuesday that the Bucks and Pistons were in advanced discussions on a deal to finally rescue Jennings from a frustrating July on the open market in which the restricted free agent appeared to be frozen out of the big money.

Jennings was considering returning to the Bucks on a one-year qualifying offer -- which would have made him an unrestricted free agent -- until the Pistons swooped in with serious trade interest.