CLEVELAND — Kyrie Irving was tired of being teammates with LeBron James.

Now he has to figure out how to beat him.

Cleveland’s All-Star guard, who asked owner Dan Gilbert to trade him earlier this summer, was dealt Tuesday night to the Boston Celtics in exchange for star guard Isaiah Thomas, forward Jae Crowder, center Ante Zizic and a 2018 first-round draft pick.

Irving, whose late 3-pointer helped Cleveland win the 2016 NBA championship — and the city’s first title since 1964 — is on his way to Boston, where he’ll join a Celtics team that lost to the Cavs in last season’s conference finals.

And as fate will have it, the Cavs will host the Celtics in their season opener on Oct. 17.

“Kyrie is one of the best scorers in the NBA,” Celtics president Danny Ainge said. “He has proven that on the biggest stage, the NBA Finals, the last three years. He’s been an NBA champion, an Olympic gold medalist, and a four-time All-Star. For all he’s accomplished, we think his best years are ahead of him.”

The blockbuster deal caps a wild summer for the Cavs, who lost their title defense in five games to Golden State in June. Since then, general manager David Giffin left, the team failed to convince Chauncey Billups to join its front office and James has played with fans’ emotions with veiled postings on social media about his future.

Irving’s trade demand cast a dark shadow over the entire organization.

But Cleveland may have salvaged its offseason with this trade.

In Thomas, they’re getting a proven playmaker with a stellar reputation. The 5-foot-9 guard is one of the league’s most dynamic backcourt players with an uncanny ability to get to the basket. Irving may be the only better finisher among point guards.

The 28-year-old Thomas was taken with the final pick in the second round in 2011, but he has steadily scaled his way up to elite status.

His reputation in Boston was cemented when he led the Celtics through the playoffs last season despite the death of his sister on the eve of the postseason. He also had a front tooth knocked out during the second-round series against Washington and a hip injury eventually forced the team to shut him down early in the East finals, won by the Cavaliers in five games.

“Isaiah embodied what it meant to be a Celtic,” Ainge said. “He captured fans’ hearts not only with his spirit, but his personality. Jae’s toughness was contagious for our team. He improved his skills each year, but it’s his energy and fight that will be remembered. We wish them and their families the very best.”

Copyright 2017 Associated Press. All Rights Reserved.