Cuonzo Martin agreed to become the next men's basketball coach at Missouri on Wednesday. Sources tell ESPN the deal is for seven years and a little more than $21 million.

Martin resigned earlier in the day as coach at Cal. Wyking Jones will serve as interim coach, the school announced.

"We are thrilled that Cuonzo is returning to the Midwest and that his family will now call Columbia home," Missouri athletic director Jim Sterk said in a statement. "From the outset of our search, our goal was to find a coach who had demonstrated success, academically and on the court, while also sharing our values and who can help to reignite interest in Mizzou men's basketball among our fan base."

ESPN reported earlier in the day that Missouri had offered its job to Martin, a native of East St. Louis, Illinois, and that he was considering the opportunity to replace Kim Anderson, who was fired earlier in the month.

After resigning as head coach at Cal, Cuonzo Martin has agreed to a seven-year deal with Missouri for more than $21 million, sources tell ESPN's Jeff Goodman. Leon Bennett/Getty Images

"Cuonzo Martin informed me this morning that he is resigning to accept a position at another school," Cal athletic director Mike Williams said in a news release. "We put forth our best effort to retain him, but he told me it wasn't about Cal, rather a strong desire to move closer to home.

"We appreciate all that Cuonzo has done with our men's basketball program over the past three seasons, creating excitement inside Haas Pavilion, guiding our team to a pair of postseason appearances and improving the academic performance of our student-athletes."

Martin, 45, went 62-39 in three seasons at Cal, leading the Golden Bears to the NCAA tournament in 2016. Martin also recruited an elite class in 2015, landing five-star prospects Jaylen Brown, who became the No. 3 pick in last year's NBA draft, and Ivan Rabb, a likely first-round selection this June.

Martin also spent three seasons at Tennessee and three seasons at Missouri State, reaching the NCAA tournament in 2014 with the Volunteers. He was a longtime assistant coach at Purdue, where he averaged 13.1 points per game during his four-year playing career.

Missouri was 8-24 this season.