Vince Carter is leaving the Dallas Mavericks to join the Memphis Grizzlies.

The Grizzlies announced the deal with the 37-year-old Carter early Saturday morning, but did not disclose terms.

Sources told ESPN.com that Carter was finalizing a three-year, $12.2 million contract Friday night to join the Grizzlies, who have coveted him for some time.

The Mavericks were hoping to keep Carter but didn't have the financial flexibility to pay him the sort of money Memphis offered after extending a three-year, $46 million offer sheet to Houston Rockets restricted free agent Chandler Parsons.

The Mavs tried to re-sign Carter with the cap-room exception worth $2.7 million per year, the most they could offer with the commitment to Parsons. A source told ESPNDallas.com's Tim MacMahon that Carter informed the Mavs that he would return to Dallas for a two-year deal worth $8 million, but the Mavs could offer that only if the Rockets exercised their right to match the offer to Parsons.

The Mavericks hoped to keep Vince Carter but do not have the financial flexibility to pay him like Memphis can. Glenn James/NBAE/Getty Images

The Grizzlies tried hard to acquire Carter in a deal at the 2013 trade deadline but instead acquired Tayshaun Prince when Dallas pulled out of the talks.

Memphis had hoped to re-sign Mike Miller but quickly turned its attention to Carter when it became apparent Miller was intent on joining LeBron James with the Cleveland Cavaliers.

Late Friday, Miller announced on his Instagram account that he will not return to the Grizzlies next season.

"Just informed the Grizz are going in another direction," he wrote. "I completely understand, but wanted to thank you so much for everything. Awesome city. Awesome fans. Thank you for the opportunity. I will always love Memphis #letitfly."