Throughout much of the summer, Spurs forward LaMarcus Aldridge heard his name whispered in trade talks.

There were rumors of his unhappiness in San Antonio. There were rumblings about San Antonio’s unhappiness with him.

When training camp arrived last month with Aldridge still slated to wear silver and black, the five-time All-Star decided it was best to view the summer of his discontent with a certain professional detachment.

“It’s a part of the NBA,” Aldridge said recently. “Guys move around and guys go from team to team at times. It happens.”

Like something out of a sappy rom-com, the relationship between Aldridge and the Spurs took another unexpected twist Monday.

The 31-year-old Aldridge renewed his vows with the Spurs, agreeing to a three-year, $73 million contract extension that could keep him in town through the 2020-21 season.

Now Playing:

This was Sam and Diane, or at least Ross and Rachel, back on again.

“Obviously, it would put the other rumors to rest that he is not happy here,” guard Danny Green said hours before Aldridge’s new deal was finalized. “It seems right now he’s feeling comfortable, he’s fitting in well. He is kind of more at home now.”

The Spurs and Aldridge faced an 11 p.m. deadline Monday to work out an agreement on an extension.

Had they failed, Aldridge would have had two years left on the contract he signed in July 2015, with a $22.3 million player option looming next summer.

Monday’s deal works for both sides. By extending Aldridge, the Spurs retain the services of a player better than they were likely to land in free agency next summer. The Spurs have won 128 games in two seasons since pairing Aldridge with All-Star ringleader Kawhi Leonard.

For Aldridge, meanwhile, the upside is obvious. He gets to guarantee himself a sizeable NBA paycheck until he is almost 36.

“We won a lot of games last year, and it’s because of him,” Green said. “I think he likes this atmosphere and he likes that winning culture.”

With extension talks still in flux Monday afternoon, neither Aldridge nor coach Gregg Popovich were available for comment after Spurs practice.

After Friday’s preseason finale in Houston, Popovich praised Aldridge’s work throughout the exhibition schedule. Aldridge averaged a team-best 18 points and shot 54.7 percent in five preseason games.

“I think he’s had a great preseason,” Popovich said. “He’s playing free and easy and busting his butt. We couldn’t be more pleased.”

Now Playing:

In two seasons since arriving as the most sought-after free agent in Spurs history, Aldridge has averaged 17.6 points — down from 19.4 in nine seasons with Portland.

He has also posted 7.9 rebounds and 1.2 blocks per game, and anchored the low-post defense after Tim Duncan’s retirement.

Aldridge’s 49.5 percent shooting clip in two San Antonio seasons is better than his career rate. He is one season removed from earning third-team All-NBA honors.

“I see him playing great,” veteran guard Manu Ginobili said. “I see him in a good mood. When I get all these questions about L.A., it’s kind of surprising.”

Aldridge was a key reason the Spurs advanced to the Western Conference finals last season, posting a mammoth 34-point, 12-rebound effort in the Game 6 closeout win over Houston — secured with Leonard and Tony Parker out with injuries.

Aldridge fizzled against Golden State in the next round after Leonard again left with a sprained ankle in Game 1, averaging 15.5 points and shooting only 41.3 percent.

Heading into the offseason, Aldridge met with Popovich to discuss his role and his fit. Both sides described the sit-down as productive.

Finding himself still a Spur at the dawn of training camp, Aldridge returned with a commitment to work on the marriage between himself and his team.

Monday’s news put that commitment in writing.

“The relationship has always been great,” Aldridge said at the start of camp. “There’s no issue. It’s just trying to mesh who I was to who I am now and try to get more out of the system.”

On Monday, Aldridge bought himself more time to work on it. Or, more accurately, the Spurs bought it for him.

The Spurs and Aldridge are officially together for the long haul.

Like any marriage, it’s for better or worse. The Spurs are doubling down on the former.

jmcdonald@express-news.net

Twitter: @iJMcDonald_SAEN