Unexpectedly, Magic Johnson has stepped down as president of basketball operations for the Los Angeles Lakers.

Johnson made the announcement Tuesday before the start of the Lakers-Portland Trail Blazers game at Staples Center.

Johnson told reporters he made the decision because of his relationship with Lakers owner Jeanie Buss.

“I want to always preserve our relationship with her,” an emotional Johnson said, “and I think I had more fun when I was able to be the big brother and ambassador.”

It was such a stunning move, Johnson said he had not yet told Buss of his decision.

“Somebody’s going to have to tell my boss because I knew I couldn’t be face-to-face and tell her,” Johnson told reporters.

The surprising and surreal announcement from the Lakers legend comes at the tail end of a disappointing and frustrating season for the Lakers. They signed LeBron James in the offseason, but a flawed roster combined with injuries, including one to James, torpedoed the Lakers’ season. They were 20-14 and in fourth place in the Western Conference after beating Golden State on Christmas Day. But James was injured in that game, and Los Angeles went 6-11 without him. They never recovered and failed to make the playoffs for a franchise-record sixth straight season.

OPINION:Warriors' favorite time of year finally here, Steph Curry & Co. wide awake

WADE HONORED:Obama congratulates Dwyane Wade on his NBA career

CLICK & ROLL:Exclusive NBA commentary delivered to your inbox

Johnson indicated in an impromptu news conference that he was in an uncomfortable position between Buss and Lakers coach Luke Walton. It was expected that Walton would be fired after the season because he was not hired by Johnson or general manager Rob Pelinka.

"(On Wednesday) I would have to affect somebody's livelihood and their life," Johnson said. "And I thought about it and I said, 'That's not fun for me. That's not who I am.' And then I don't want to put her in the middle of us, even though she said, 'Hey, you can do what you want to do.' I know she has great love for him and great love for me."

He also said: “It’s hard when you love an organization the way I love this organization. It’s hard when you love a person like I love Jeanie. I don’t want to hurt her. And I love Luke.”

Buss tweeted later Tuesday night:

"Earvin, I loved working side by side with you. You’ve brought us a long way. We will continue the journey. We love you"

Now what? That leaves Pelinka in a difficult position. Does he keep Walton? And how does he make the roster better? Or, does Pelinka even remain GM? Will the Lakers replace Johnson? If so, it will be another sought-after position.

Johnson also said any decision on Pelinka's or Walton's job status is up to Buss.

“I’m telling you we’re in a good position,” Johnson told reporters. “Next year we’re going to be good. If we get another one of these guys we’re going to be really good.”

The Lakers issued a statement later Tuesday night that read:

"There is no greater Los Angeles Laker than Earvin Johnson. We are deeply grateful to Magic for all that he has done for our franchise - as a player, an ambassador and executive.

"We thank him for his work these past two years as President of Basketball Operations and wish him, Cookie, Andre, EJ and Elisa all the best with their next steps. He will always be not only a Lakers icon, but our family.

"As we begin the process of moving forward, we will work in a measured and methodical fashion to make the right moves for the future of our organization."

Johnson was named president of basketball operations in February 2017, and Johnson had said that if the Lakers weren’t in good shape in two seasons, he would resign.

“If I can’t deliver, I’m going to step down myself,” Johnson said after the 2018 draft but before James announced his decision to play for the Lakers. “(Buss) won’t have to fire me. I’ll step away from it. Because then, I can’t do this job.”

Then, James signed with Los Angeles, and it looked like the Lakers were headed in the right direction.

However, a recent story in The Athletic painted Johnson as an “absentee executive” and Pelinka as “unnecessarily meddling in low-level affairs.”

It was an awkward front-office dynamic. Johnson had little experience running and building a team, and Pelinka was a long-time agent before taking this high-profile job.

It is obvious Johnson did not like to operate within NBA rules that forbid tampering or talking about and with players on other teams. He said he felt handcuffed in the job. The incident with Philadelphia’s Ben Simmons in which Johnson offered to help Simmons bothered him. Johnson also said he wanted to congratulate Russell Westbrook on his 20-point, 20-rebound, 20-assist performance but felt he couldn’t because of league rules. The Lakers and Johnson were fined multiple times for tampering-related issues.

"I thought about Dwyane Wade retiring (Wednesday), and I can't even tweet that out or be there," Johnson said. "Serena Williams called me a week ago and said, 'Will you mentor me and be on my advisory board?' And I said, 'Yeah, I'm going to do that.'

"So when Ben Simmons called and we went through the proper channels and they made me look like the bad guy out of that situation, but I didn't do anything wrong ... I was thinking about all those times, all those guys who want me to mentor them or be a part of their lives, and I can't even do that. I had more fun on the other side."

Perhaps, Johnson is not suited to work for an NBA team.

He acknowledged, “I was happier when I wasn’t president.”

Follow Jeff Zillgitt on Twitter @JeffZillgitt