DALLAS (AP) — The Dallas Mavericks had to give up DeSagana Diop to get Jason Kidd. Now, the 7-foot center is headed back to Dallas.

Diop agreed Wednesday to a $31 million, five-year contract with the Mavericks, according to a person close to the negotiations who requested anonymity because NBA rules prevent the deal from being signed until next week.

Dallas also has agreed to a one-year, minimum-salary contract with Gerald Green, a 22-year-old former slam dunk champion who had been unemployed since March. He passed a physical Wednesday and paperwork to make the deal official is being finalized. Since he wasn't on a team when last season ended, he can be signed at any time.