The Detroit Pistons have agreed to a five-year deal with former Toronto Raptors head coach Dwane Casey, according to ESPN's Adrian Wojnarowski.

The team had reportedly narrowed down its search between Casey and John Beillin of the University of Michigan last week. The latter pulled his name from consideration following a second interview, making this the predictable outcome.

Casey is fresh off coaching the Raptors to the best record in franchise history, finishing with 59 wins and 23 losses, also garnering the top seed in the Eastern Conference for the first time in team history.

The 61-year-old coach has also been swept out of the last two postseasons by the Cleveland Cavaliers, but will now have the chance to work with a different roster, assembling the pieces left in place by former boss Stan Van Gundy.

Pistons owner Tom Gores had virtually cleaned house, by parting ways with Van Gundy shortly after the end of the regular season and then with general manager Jeff Bower, giving this front office a completely different look, and determined to separate coaching from basketball operation.

Detroit will operate with an All-Star frontcourt of Blake Griffin and DeAndre Jordan, but will have to figure out the pieces around them in hopes to take the team into playoff contention.