Free-agent guard Tony Parker has agreed to a two-year, $10 million deal with the Charlotte Hornets, a league source told ESPN's Adrian Wojnarowski, bringing to a close his 17-year career with the San Antonio Spurs.

Parker, who had become an unrestricted free agent this summer, called Spurs coach Gregg Popovich in the last hour to inform him of his decision to accept Charlotte's offer, a source told Wojnarowski. The Spurs wanted Parker back in a mentorship role, but he will take on a significant role with the Hornets behind guard Kemba Walker.

The Denver Nuggets also had expressed interest in Parker.

Parker, 36, was selected by the Spurs 28th overall in the 2001 NBA draft and has spent his entire professional career in San Antonio. He won four titles with the Spurs (2003, 2005, 2007 and 2014) and was the 2007 NBA Finals MVP.

"Tough decision. Tough three days. Tough communicating it all to Pop," Parker told The Undefeated's Marc Spears. "But I had to move on. It was a very emotional conversation with Pop and [Spurs general manager] R.C. Buford. I will always love San Antonio. I will always be a Spur. My family and house are in San Antonio. But I'm excited to play for my idol in M.J. [Hornets owner Michael Jordan], coach J.B. [James Borrego], who I played for in San Antonio, and with my little brother Nicolas Batum."

Parker is the third player in NBA history to play at least 17 seasons with one team before leaving. The two others are Karl Malone (18 seasons) and Hakeem Olajuwon (17 seasons).

"It's difficult to put into words how important Tony Parker has been to the Spurs franchise over the past two decades," Popovich said in a statement. "From his first game in 2001 at age 19, TP has impressed and inspired us -- day after day, game after game, season after season -- with his passion, dedication and desire. We are grateful to Tony for 17 years of truly amazing memories."

Parker's leadership was evident during the Spurs' attempts to ameliorate Kawhi Leonard during the latter's lost season of 2017-18. Back in March, Parker led a players-only meeting, along with Manu Ginobili, imploring the injured Leonard to return to the lineup, Wojnarowski reported.

Tension between Parker and Leonard emerged after Parker said his own quadriceps injury was "100 times worse" than Leonard's. Leonard had been seeking outside treatment and recovering away from the team for most of last season.

Parker ruptured his left quadriceps tendon in the 2016-17 Western Conference finals and now says he is close to 100 percent healed. He returned to the court on Nov. 27 last season after 208 days. His injury was considered more significant than Leonard's, and the team sought advice from the world's best tendon experts for Parker and Leonard.

Parker elected to utilize the Spurs' doctors, and Leonard sought treatment outside of the organization.

"I have no problem with Kawhi Leonard. We never had an argument," Parker told The Undefeated. "When the journalist asked me if my injury was worse than Kawhi's, I said yes because it was true. But that didn't lessen the significance of his injury. He took over the franchise, and I gave up the torch of the franchise willingly. It's very sad that the media took one quote and made it sound like I didn't want to play with him. He was the face of the franchise."