The Toronto Raptors have reached an agreement in principle to hire Dallas Mavericks assistant Dwane Casey as their new coach, according to sources close to the situation.

Casey's hiring has not been formally announced by the Raptors but, barring an unforeseen snag, Toronto's selection of Rick Carlisle's trusted assistant is expected to be finalized before the NBA draft Thursday night.

Sources told ESPN.com that Casey was already in New York on Monday observing the Raptors' private pre-draft workout of lottery hopeful Bismack Biyombo.

ESPNDallas.com reported Thursday that Casey had emerged as the clear favorite to land the Raptors' job this week. Toronto narrowed its search for a successor to Jay Triano down to the former Minnesota Timberwolves coach and Boston Celtics assistant coach Lawrence Frank but zeroed in on Casey shortly after the NBA Finals. The Raptors were drawn largely to Casey's success as the defensive coordinator for a Mavericks team that just won the first championship in franchise history.

Casey's reputation as a defensive guru undoubtedly appeals to the Raptors after they finished 30th in the league in defensive efficiency last season, allowing 110 points per 100 possessions. The Mavericks finished seventh in the same category (102.3 points per 100 possessions) and further shed their reputation as defensive pushovers in the playoffs with successful schemes against the likes of Kobe Bryant, Kevin Durant, Russell Westbrook and, most notably, LeBron James.

Casey, 54, has been waiting for a second shot at a top job since being dismissed by the Timberwolves with a record of 20-20 during the 2006-07 season. He narrowly missed out on coaching jobs last summer with the Atlanta Hawks and Los Angeles Clippers and was a co-finalist with Frank this spring for the jobs in Houston and Golden State that went to Kevin McHale and Mark Jackson, respectively.

Frank was 225-241 in parts of seven seasons coaching the Nets before joining Doc Rivers' staff in Boston this past season, replacing Chicago Bulls coach Tom Thibodeau. Frank interviewed with the Detroit Pistons on Wednesday and is a finalist for that job as well along with former Hawks coach Mike Woodson and Milwaukee Bucks assistant coach Kelvin Sampson.

Sources say Casey declined the opportunity to interview for the Pistons' job.

Marc Stein is a senior NBA writer for ESPN.com.