LeBron James came within reach of ending one of the greatest careers in basketball history before deciding instead to chase one last NBA championship, announcing Friday that he will join the Philadelphia 76ers for what he says will be the final chapter of his career.

After weeks of weighing retirement against several possible destinations, the NBA's all-time leading scorer revealed on social media that he had initially planned to walk away following his 23rd season but ultimately chose to continue playing, turning down potential reunions with the Cleveland Cavaliers and Miami Heat, as well as the possibility of joining the Golden State Warriors.

Instead, the four-time NBA champion made perhaps the most surprising decision of his career by signing with a Philadelphia franchise that has spent more than four decades searching for another title.

"I believe I can help make the Philadelphia 76ers a championship team and I am so excited to energize a new fan base and start this incredible journey one last time," James wrote.

James admitted retirement was his first choice after the Los Angeles Lakers' season ended.

"I was pretty sure I played my last game," he wrote. "I was honest at that last press conference when I said I needed to look at myself and decide if I still love this game. I still truly love this game, and I have more to give."

According to ESPN, the 41-year-old will sign a two-year contract worth $8 million on the veterans minimum, a dramatic pay cut after earning nearly $53 million last season with the Lakers.

James made it clear that money played no role in his decision.

"I'm not going for money. I'm not going for family," he wrote. "What am I really playing for at this point? I still want to sacrifice. I still want to work. I still want to grind. I still want to compete, to win and to have a chance at the feeling of winning."

He celebrated the announcement with an Instagram video featuring highlights from his career set to Philadelphia rapper Meek Mill's "Dreams and Nightmares," the unofficial anthem of the city's sports teams. The clip ended with the famous lyric, "Hold up, wait a minute. Y'all thought I was finished?" before cutting to the 76ers logo.

The excitement in Philadelphia was immediate.

Fanatics released James' No. 23 76ers jersey shortly after the announcement, pricing it at $125. The first batch sold out within hours despite deliveries not being scheduled until late August.

James now joins a team desperate to end one of the NBA's longest championship droughts. Philadelphia has not won a title since 1983 and has failed to advance beyond the Eastern Conference semifinals since reaching the NBA Finals in 2001.

The 76ers finished 45-37 last season before being swept in the second round by the eventual champion New York Knicks. Even so, sportsbooks quickly listed Philadelphia among the league's top championship contenders, behind only the Oklahoma City Thunder, San Antonio Spurs and Knicks.

The addition of James gives Philadelphia one of the NBA's most talented starting lineups alongside reigning stars Joel Embiid, Tyrese Maxey, second-year standout VJ Edgecombe and Jaylen Brown, the 2024 NBA Finals MVP who arrived earlier this offseason in a blockbuster trade from the Boston Celtics.

Maxey reacted to the signing by posting an Instagram story of himself celebrating in a gym while repeatedly shouting, "What!? What!?" Brown welcomed the news on X with "#throwtheballup," the same slogan he used after joining Philadelphia that has since appeared on billboards across the city.

Even Pennsylvania Gov. Josh Shapiro joined the celebration, proclaiming Friday as LeBron James Day throughout the state.

The signing also capped a remarkable offseason for new 76ers president Mike Gansey, who grew up playing high school basketball in Ohio alongside James. After landing Brown earlier in the summer, Gansey completed one of the most significant free-agent acquisitions in franchise history.

James arrives with a résumé unlike any player the NBA has ever seen.

The league's oldest active player will enter his 24th season after becoming the first player in NBA history to complete 23 campaigns. He is a four-time NBA champion, four-time MVP, four-time Finals MVP, 22-time All-Star, 21-time All-NBA selection and a member of the NBA's 75th Anniversary Team.

Last season, James averaged 20.9 points, 6.1 rebounds and 7.2 assists. Across more than 1,600 career games, he has averaged 26.8 points, 7.5 rebounds and 7.4 assists.

James began his NBA journey with Cleveland in 2003 before winning back-to-back championships during a four-year stint in Miami. He returned to the Cavaliers and famously led the franchise to its first NBA championship in 2016 by overcoming a 3-1 Finals deficit against Golden State. He then spent eight seasons with the Lakers, capturing another title in 2020.

Both Cleveland and Miami reportedly remained serious options as James evaluated his future, but he ultimately chose a new challenge.

"Thank you LA. Miami I'll forever love and Northeast Ohio will always home!" James wrote.

Now, after championships with the Cavaliers, Heat and Lakers, James will attempt to deliver the same success to a storied Philadelphia franchise that has featured legends such as Wilt Chamberlain, Julius Erving, Charles Barkley and Allen Iverson.