ORLANDO, Fla. — The Nets not only have solved their backup point guard problem, but they potentially have helped the Cavaliers bring back LeBron James.

Capitalizing on the Cavaliers’ attempts to clear salary-cap space to try and lure James back to Cleveland, league sources confirmed the Nets completed a long-rumored trade by sending Marcus Thornton to the Cavs Wednesday in exchange for Jarrett Jack and Sergey Karasev as part of a three-team deal including the Celtics.

As part of the trade, Thornton will move from Cleveland to Boston, along with Tyler Zeller, and a future first-round pick. Ironically, the Celtics acquired those assets using the trade exception created by the trade of Kevin Garnett and Paul Pierce to Brooklyn last summer. Because the Celtics are using a trade exception, the deal cannot become official until Thursday, when the league’s moratorium period ends and teams can begin signing free agents and making trades.

Jarrett Jack becomes the Nets’ backup point guard.Photo: Getty Images

It’s a strong move for the Nets, who used Thornton’s expiring contract to acquire both Jack, a veteran point guard who will give them much-needed stability at the position after Shaun Livingston signed with Golden State last week, while also adding Karasev, a young Russian talent who both the front office and ownership were enamored with during the draft process a year ago.

Jack had a down year in Cleveland last season, his first after signing a four year, $25.2 million deal last July. After averaging 12.9 points and 5.6 assists while shooting over 40 percent from 3-point range with the Warriors the season before, Jack averaged 9.5 points and 4.1 assists while shooting 41 percent from the field and 34 percent from 3-point range.

With Golden State, Jack played behind and with Stephen Curry — something the Nets hope to duplicate as he plays the same role with Deron Williams. Jack represented a better option than any free agent available for a minimum contract, which is all the Nets have to offer after coming to an agreement with Bojan Bogdanovic to give him the mini mid-level exception.

Karasev was a bit player for the Cavaliers last season after being taken 19th overall in the draft, but at 20 years old is still a developing player.

Sergey KarasevPhoto: AP

The 6-foot-7 shooting guard played in just 22 games with the Cleveland, which had a glut of wings before they drafted Andrew Wiggins with the No. 1 pick in last month’s draft. Karasev was a teammate of the Nets’ Andrei Kirilenko on the Russian national team at the 2012 Olympics in London, where he played briefly in two games as an 18-year-old on the bronze-medal-winning squad.

The Nets had discussed acquiring Jack at the trade deadline — sources said Jason Kidd, in particular, was enamored with him — but instead shipped Jason Terry and Reggie Evans to the Kings for Thornton. Now they not only get Jack, but also another young player as they continue to try to both get younger and less expensive.

Cleveland’s motivation to make the trade was clear: opening up space for a max contract under the salary cap to attempt to re-sign James, who is reportedly down to Cleveland and Miami, and who met with Heat brass in Las Vegas on Wednesday.

Thornton was an effective scorer off the bench for the Nets, finishing with more than 15 points nine times in 26 regular-season games in Brooklyn, averaging 12.3 points per game and hitting 38 percent of his 3-pointers. He also scored 17 points in Game 7 of the Nets’ first-round playoff series victory over Toronto, helping ensure the Nets advanced to face the Heat, who they lost to in five games.