The DeMar DeRozan–and–Kyle Lowry era of the Raptors officially ended Wednesday, when they traded DeRozan, Jakob Poeltl, and a protected 2019 first-round pick to the Spurs for Kawhi Leonard and Danny Green. Trading the most accomplished player in franchise history for a guy who has made it clear he wants to leave for Los Angeles in a year is a gamble, but it’s not quite as risky as it seems. Toronto had hit a ceiling with Lowry and DeRozan as its best players. Just as important, it has a promising young core waiting in the wings, so it will be in a good position going forward even if Kawhi doesn’t stay.

The Raptors changed more last season than they appeared to on the surface. While they were knocked out of the playoffs by LeBron James and the Cavs for the third consecutive season, they became younger, more versatile, and more athletic in the process. Toronto completely remade its supporting cast around DeRozan, Lowry, Serge Ibaka, and Jonas Valanciunas. OG Anunoby, the no. 23 pick in last year’s draft, won a starting spot as a rookie, while Fred VanVleet, Delon Wright, Pascal Siakam, and Poeltl formed one of the best benches in the NBA.

Even with DeRozan, the Raptors’ transition would have continued next season. They fired head coach Dwane Casey in the offseason and replaced him with Nick Nurse, one of his top assistants. Nurse had spearheaded the development of their young players, and he almost certainly would have given them more responsibility, no matter who else was on the team. Their bench won more games for them than their starters last season. Lowry (plus-7.5) and DeRozan (plus-6.9) had the seventh- and 10th-best net ratings, respectively, in their rotation.

It’s unclear how Nurse will set up their rotation following the trade. Kawhi, assuming he plays, will take DeRozan’s spot in the starting lineup, while Green will likely slide in as a 3-and-D shooting guard who starts alongside Lowry and Kawhi. The question is whether Anunoby, the starting small forward last season, will move to power forward, or whether the Raptors will stick with a more traditional front line of Valanciunas and Ibaka. Considering the trouble the two big men have had staying on the floor together in the playoffs, it probably makes more sense to move one to backup center, the role Poeltl had last season.

If Kawhi is healthy and motivated to play, which is no guarantee, the Raptors will be a much better team next season. While DeRozan is a great player, he’s not one of the five best in the league. Kawhi is a former Finals MVP in the prime of his career, a two-time Defensive Player of the Year who averaged 25.5 points on 48.5 percent shooting, 5.8 rebounds, 3.5 assists, and 1.8 steals a game two seasons ago. He’s a significantly better 3-point shooter and defensive player than DeRozan, and he will make everyone around him better on both ends of the floor.

The biggest coup in the trade for Toronto was not giving up Anunoby, who has been compared to Kawhi since his days in college. Anunoby, who was less than a year removed from ACL surgery, exceeded all expectations as a rookie. At 6-foot-8 and 232 pounds with a 7-foot-2 wingspan, he has the size and athleticism to switch screens and defend players at all five positions, and he shot surprisingly well (37.1 percent on 2.7 attempts per game) from the 3-point line. While Anunoby is unlikely to ever be as good as Kawhi, it’s hard to put a ceiling on him considering his incredible physical tools and his rapid development over the past few years.

The combination of Anunoby and Kawhi gives Toronto an element it never had in the DeRozan-and-Lowry era, when it was repeatedly brutalized by bigger and more athletic wings in the playoffs. Those two can match up with Gordon Hayward and Jayson Tatum in Boston, Ben Simmons in Philadelphia, and Khris Middleton and Giannis Antetokounmpo in Milwaukee. The Raptors will have more depth than any of their competitors in the East, and now they have a legitimate MVP candidate, as well.

Their depth means they shouldn’t miss Poeltl, the no. 9 overall pick in the 2016 draft, all that much. The 22-year-old averaged 6.9 points on 65.9 percent shooting, 4.8 rebounds, and 0.5 steals a game last season, but his inability to guard on the perimeter or bang in the paint was exposed in the playoffs. His departure may make the return of Lucas “Bebe” Nogueira, another young center, more likely. The Raptors didn’t extend a qualifying offer to Nogueira this offseason, so he’s an unrestricted free agent. He’s not as skilled as Poeltl, but he’s far more athletic.

Overall, Toronto has more talented young players than it can even use. VanVleet, along with Anunoby, is the Raptors’ other young cornerstone. An unrestricted free agent in 2016, he averaged 15.5 points on 42.6 percent shooting and 5.8 assists per 36 minutes of playing time last season, with the highest net rating (plus-12.1) of anyone in their rotation. The Raptors signed him to a two-year, $18 million contract this offseason, and there’s a good chance he’ll become the starting point guard when Lowry’s contract expires after the 2019-20 season.

Siakam, a 24-year-old combo forward, and Wright, a 26-year-old point guard, could also be important players for the Raptors’ future. Siakam, at 6-foot-9 and 230 pounds with a 7-foot-3 wingspan, is almost as versatile defensively as Anunoby, and he’s got a surprising feel for the game for a hyperathletic big man. Wright, at 6-foot-5 and 183 pounds with a 6-foot-6 wingspan, is an intelligent player with the physical tools to match up with all three perimeter positions on defense. He has turned himself into a solid 3-point shooter in his three seasons in the NBA, allowing him to play off more ball-dominant guards like VanVleet and Lowry.

Nurse will have lots of lineup combinations to choose from in a playoff series. He has two point guards (Lowry, VanVleet), four 3-and-D wings (Green, Wright, C.J. Miles, and Norman Powell), three versatile forwards (Kawhi, Anunoby, and Siakam), and two traditional big men with 3-point range (Ibaka and Valanciunas). That doesn’t even count Lorenzo Brown, the MVP of the G League last season, whom the Raptors signed to a one-year, partially guaranteed deal this offseason. The big knock on Casey was his inability to make the correct lineup adjustments over the course of the playoffs. If Nurse can get everyone in the rotation to buy in, he will be able to mix and match with any team in the NBA.

It may not work. Nurse is a rookie head coach with a ton of pressure on him, and not even Gregg Popovich, one of the most respected figures in the league, was able to manage the demands of Kawhi and his inner circle. Lowry also has a reputation for being prickly, and he was really close with DeRozan, who reportedly feels betrayed by team president Masai Ujiri after he told DeRozan that he would not be traded earlier this summer.

The beauty of the move Ujiri made is that the Raptors are protected even in a worst-case scenario. If Kawhi leaves next summer, they can still reload around VanVleet, Anunoby, and their other young players. Lowry, Valanciunas, Ibaka, and Miles will all come off the team’s cap in 2020, so they have only one guaranteed contract and maybe three rookie-deal options on the books for the 2020-21 season. They will have the financial flexibility and the young talent to get involved in trade discussions if any other stars get put on the trade block. If Kawhi refuses to play, the Raptors could always try to move him to the Lakers at some point before the trade deadline and pick up another young player or two in the process.

Toronto had to do something. Even with LeBron in Los Angeles, it was behind Boston and Philadelphia in the pecking order out East. There was no reason to believe DeRozan and Lowry would outplay Hayward and Kyrie Irving or Simmons and Joel Embiid in the playoffs over the next few seasons. And while Kawhi may not want to play in Toronto, it’s a good situation for him, both next season and into the future. There’s no way to know whether he will stay, but the Raptors will be fine, either way.