Prior to returning to Toronto to work after his stint with Denver, Masai Ujiri’s signature move as an NBA executive was extracting maximum value for Carmelo Anthony, a superstar who wanted out of Denver in the worst way.

Just six months into his tenure running the Toronto Raptors Ujiri has another signature transaction to put on his resume, this one perhaps even trickier to pull off than the first: trading Rudy Gay, a pseudo superstar that seemingly no one in the NBA wanted any part of, and who the Raptors wanted out of Toronto in the worst way.

The moves represent different sides of the same coin, and suggest a general manager able to keep his own counsel and be decisive when it counts.

How off-the-radar was the Gay trade? Even 48 hours ago sources close to the Raptors and around the NBA were saying the same thing: moving the Raptors’ $19-million man was proving so difficult and the market for a fading, high-volume shooter who has shown no ability or aptitude for meshing in an offence that didn’t revolve around him that Ujiri had basically given up trying to move him.

When news leaked out Sunday night that Gay and forward Quincy Acy were being sent to Sacramento for a quartet of role players, none of whom come with booby-trapped contracts, reaction around the league was incredulous.

“Doesn’t Sacramento watch the games?” said one long-time league executive.

There was no apparent market for the 27-year-old forward who shot just 41.6 percent from the floor last season and slipped to 38.8 percent so far this season. More concerning was he seemed to have lost his early career explosiveness as suggested by his chronic inability to finish contested shots in the paint.

But $19-million speaks loud and clear and so as long as Gay was on the roster he was going to be the focal point of the team. The problem, he was the focal point of a weak team – Toronto was 24-30 since Gay was acquired from Memphis by former general manager Bryan Colangelo.

Moreover, it was a team of misfit parts that played selfishly, led by Gay who was on pace to be just the second player in modern NBA history to average less than 2.2 assists while shooting less than 40 percent from the floor and taking 19 shots a game.

The Raptors, who according to sources close to ownership had internally committed to tearing down their roster and rebuilding, were essentially stuck in basketball limbo: Gay and his contract were a logjam preventing them to move forward into the future.

Worse, his presence on the floor was an obstacle to further increasing the role of key building blocks like Jonas Valancuinas or DeMar DeRozan while sucking up minutes and shots that could be given to Terrence Ross to determine how he might fit for the future; or at the very least improving his trade value.

The Raptors knew what they wanted to do, but Gay was a roadblock that didn’t seem avoidable. Even late last week sources close to the team were coming to grips with the possibility that Gay would play out his contract in Toronto hampering the team’s progress for this season and next. His presence threatened to hold the Raptors’ future hostage and after five years without the playoffs anything that delayed a proper rebuild was in some corners of the fanbase the equivalent of water torture.

And then in one unforeseen swoop, like a liberator arriving in occupied territory, Ujiri has altered the short and long-term trajectory of the franchise.

It’s not even inconceivable that the Raptors could benefit competitively. Greivis Vasquez immediately improves the backup point guard position. Chuck Hayes and Patrick Patterson are passable depth bigs and John Salmons can backup both wing positions.

Most vital: Patterson and Vasquez can be free agents after this season; Salmons can be bought out for $1-million and Hayes is owed $6-million. The move clears about $12-million in cap space for next season.

It would seem the tank is on but in the bizarrely weak Eastern Conference, with features Indiana and Miami at the top and 14 teams that should be 8th seeds at best, the Raptors might even improve their playoff hopes.

If it happens it would at least be as result of players that could be part of the future: a growing Jonas Valanciunas or a fast-developing Ross, for example.

If that’s how the Raptors miss out on what seems like a conference-wide effort to get in the draft lottery to get a shot at the likes of Thornhill, Ont.’s Andrew Wiggins or the half-dozen or so other All-Star calibre prospects available in the June 2014 draft, it will be a lot more tolerable than squeezing in because Gay somehow got them there.

But more likely is the Gay move signals a recognition that now is not the time to be chasing the fool’s gold of a playoff berth.

Chances are Ujiri will be looking to shed anyone on the roster other than Valanciunas or DeMar DeRozan.

When Gay was acquired by Colangelo last February it was a solo move by a desperate executive who tried to sell him to ownership and the fan-base as the star-powered finishing piece of a half-baked rebuilding effort that failed to yield All-Star calibre draft picks; cap space or even hint of a championship ceiling.

It was Colangelo’s last gasp.

Less than a year later ridding the franchise of Gay is a breath of fresh air, blown in from Rockies with Ujiri.

Alone it doesn’t mean the Raptors rebuild is anywhere near complete or that the future has been secured.

But it means, at long last, it’s started. Instead of fool’s gold Raptor fans can begin to invest in the idea that one day all their pain will be rewarded with the real thing.

Ujiri can proudly put his name on that.