Pau Gasol has officially signed his new contract with the Spurs, the team announced. That part was expected. The terms of that deal, however, are a little surprising. Gasol will get $48 million over three years, with the last one being only partially guaranteed, according to ESPN’s Adrian Wojnarowski.

Manu Ginobili has decided to play for the Spurs next season, which means we had to commemorate the moment with a T-shirt.

We don’t know how the contract is structured yet, but Gasol will get on average $16 million dollars a year. He recently turned 37 and, while he’s still a quality rotation piece, he’s been showing signs of decline for a while. Paying him 16 percent of the cap is just bad business.

So why did the Spurs do it? Does it kill their chances of making a big splash in next year’s free agency? Let’s take a closer look.

Pau was probably willing to take less, but now he has no reason to do that

Gasol was expected to pick up his player option for the upcoming season, worth a little over $16 million. There’s no way he was getting that money in the free agent market. He reportedly opted out to re-structure his contract to help the Spurs. He was expected to take more guaranteed money but spread out over more years. By lowering the cap hit for 2017/18, the Spurs were making it more likely to stay under the luxury tax while bringing everyone back and adding a piece with the mid-level exception.

They needed that potential wiggle room if that was the plan. With Rudy Gay’s and Patty Mills’ new contracts on the books, they had $95 million in committed salary. Had they matched an offer sheet on Jonathon Simmons, they would have had $103 million in committed salary. That’s not counting Pau’s or Manu Ginobili’s new contract or the bi-annual exception. The tax line was set at $119 million. It was going to be tight, and under those circumstances, Pau’s contract would have likely been smaller.

But things changed dramatically when Jonathon Simmons left in free agency. That probably wasn’t part of the plan. If it was, then there was no reason to talk Pau into opting out. Even with Pau’s $16.2 million from his old contract on the books, the Spurs would have still been eight million below the tax line. That would have left room for a decent contract for Manu and would have given the Spurs extra cap space next season, as Pau became a free agent.

So Gasol was probably willing to take a smaller contract if it helped the team stay under the tax line this season. Once Simmons was gone, he didn’t have to be a discount. Without resources to get a replacement — and having likely promised him to give him as much as they could — San Antonio signed him to this new deal.

The Spurs could still have a ton of cap space next offseason

If we only consider 2017-18, Pau’s contract is not a problem. Sure, it’s bad, but it didn’t cost the Spurs another player. They didn’t spend cap space or an exception they could have used on free agents. It only makes their payroll bigger this season, which only truly concerns Peter Holt.

The problem is that it’s a multiyear deal, and it could have negative repercussions in the future. Whether it does depends on other factors. What’s actually going to determine how much cap space the Spurs will have in the summer of 2018 will be the decisions made by the teammates who have player options. Danny Green, Rudy Gay and LaMarcus Aldridge combine for $41 million in salary. If they opt out and are renounced, along with some other minor free agents, the Spurs could have max cap room regardless of Pau’s contract. It would depend on Tony Parker’s next contract, but there’s a solid chance the Spurs have already talked to him about taking less money so they can bring in reinforcements.

How this season goes will determine whether those three guys opt in or not. Aldridge, slated to make $22 million in 2018-19, is not is not likely to get more in free agency. But he might get a long-term deal. And if reports are accurate, he might be ready to leave San Antonio. Danny Green should be able to secure a better contract, even in a buyer’s market. He’s currently a bargain at $10 million a year. If Rudy Gay shows he’s healthy and effective, he’ll likely opt out, too.

Pau’s new contract would become a real problem if only one or two of those guys opt out, instead of all three. But we knew all along that Gasol was coming back. He’s making a few million more than everyone thought he would, but it was unrealistic to expect him to opt out only to take a single-year deal. It’s obviously not ideal to have him on the books for $16 million season after this, but the Spurs could always waive and stretch his salary to make room. His contract is not likely going to determine whether the Spurs sign a star or not.

It’s still a bad deal, just not as bad as it seemed at first

To make it perfectly clear, Gasol’s contract is bad. The Spurs are taking care of someone who very likely was willing to sacrifice for the good of the team while not completely mortgaging their future. That still doesn’t change the fact that — assuming they were willing to lose Simmons — they would have been better off with Pau opting in. The numbers on Gasol’s new contract aren’t as concerning as the fact that the front office seems to have misread how the offseason would play out.

After a closer look, however, this is not as apocalyptic a development as it might have seemed when the news hit. Next season the Spurs will once again have a competitive team, a reputation as player-friendly franchise and the tools to reload down the line.

Most opponents would gladly trade places with San Antonio, even after this seemingly bad offseason.