After helping the city of Cleveland banish a championship curse that spanned 52 years, LeBron James has found his next challenge: Rescuing the Los Angeles Lakers from the most unsuccessful period in the storied franchise’s history.

In what has become an every-four-years ritual for the three-time N.B.A. champion, James has chosen to switch teams in free agency for the third time in his career. He announced Sunday night that he was leaving his home-state Cleveland Cavaliers for a second time and joining the fallen giants in Los Angeles.

[Get Marc Stein’s N.B.A. insights sent directly to your inbox. Sign up here.]

The Lakers have long been considered the league’s most glamorous team, but they have missed the playoffs each of the last five seasons — the longest such drought they have endured. It prompted the Lakers’ controlling owner, Jeanie Buss, to hire one of the team’s all-time greats, Magic Johnson, as president of basketball operations in February 2017 with the specific goal of luring the sport’s biggest name to Hollywood at the top of their wish list.

James’s destination, then, was not entirely surprising, but the timing and manner in which he made his next stop known were certainly unexpected. Through a short news release issued by his agents at Klutch Sports on the first night of N.B.A. free agency, James announced at 8:05 p.m. that he would sign a four-year, $154 million contract with the Lakers.