CLEVELAND — The three-team trade that gave the Cavaliers salary cap space to possibly land LeBron James is official.

The Cavs and Boston Celtics confirmed the deal on Thursday when the NBA moratorium on signings ended.

Cleveland sent guard Jarrett Jack and swingman Sergey Karasev to Brooklyn and center Tyler Zeller and a first-round draft pick to Boston. Cleveland acquired a future conditional second-round pick from the Celtics and the draft rights to forwards Ilkan Karaman and Edin Bavcic from the Nets. The Celtics will get guard Marcus Thornton — and his expiring $8 million contract — from the Nets.

The deal, first reported on Wednesday, is designed to give the Cavs enough room under the salary cap to offer James, the four-time league MVP, a maximum contract ($20.7 million).

James, who met in Las Vegas with Miami president Pat Riley, has not announced where he will play next season. He is scheduled to attend the World Cup final in Brazil this weekend.

Jack, who signed with Cleveland as a free agent last season, was scheduled to make $6.3 million, Zeller will make $1.6 million and Karasev $1.4 million.

In trading those salaries, the Cavs have enough to give James the max deal — if he decides to sign with Cleveland. James played seven seasons with the Cavs before leaving as a free agent in 2010.