Miami Heat see past messy ending with Shaquille O’Neal to retire his number — how about LeBron James?

LeBron James #6 of the Miami Heat celebrates with team President Pat Riley in the locker room following the Heat’s victory against the San Antonio Spurs in Game Seven of the 2013 NBA Finals on June 20, 2013 at American Airlines Arena in Miami, Florida. (Photo by Jesse D. Garrabrant/NBAE via Getty Images)

MIAMI — Shaquille O’Neal’s time with the Heat never featured a happy ending.

O’Neal used the media to criticize the Heat after he was dealt to the Suns during the 2007-08 season.

“I guess when you have a lot of power, you can do what you want,” O’Neal said. “Me? If I ever came into that kind of power, I think I’d be willing to admit it if I messed up. … I understand being the scapegoat comes with being the superstar. When it all goes right, you get the credit. And when it doesn’t, I guess this is what you get. I can accept being the scapegoat when we do things my way and they don’t work out. But when you have no control how things are handled, and you are still the scapegoat, I don’t go for that.”

Ugly words and emotions couldn’t erase what O’Neal meant to Miami, as he helped bring the organization its first NBA title in 2006. O’Neal averaged 19.6 points and 9.1 rebounds in his three and a half seasons with the Heat.

Will LeBron James’ Heat story have a similar ending? Just listen to Riley’s comments on O’Neal from a Wednesday conference call with reporters.

“There’s been a lot of great teams and they can all ride off into the sunset and there are championships teams that come to an end that weren’t very pretty,” Riley said. “So you get over it quick in this league. I was not the easiest person to play for. I always realized that late in my career, which is one of the reasons I got out. Shaq had a point of view, as did a half of a dozen of other veterans that helped us win in 2006. So I got over that quick. It was not personal.”

James achieved more than O’Neal did with the Heat. James led the organization to four consecutive NBA Finals appearances and two NBA titles, compared to one Finals appearance and one NBA title under O’Neal.

“Why wouldn’t you?” former Heat player and current NBA TV analyst Steve Smith said when asked if the Heat should retire James’ number in the future. “You can’t deny what the organization along with those great players did together. The organization can’t deny it, the player can’t deny it. Now either side can say, ‘I’m not accepting it or I’m not doing it.’ But I think ultimately it will pass. I’m sure LeBron’s number will be hanging up and Dwyane’s number will be hanging up just like Shaq’s number is hanging up.”

Similar to O’Neal, James’ time in Miami didn’t end well either.

James caught the Heat off guard when he announced he was leaving Miami to return to Cleveland as a free agent in 2014. And after James led the Cavaliers to an NBA title last season, he revealed his “secret motivation” was someone with the Heat telling him that going to the Cavaliers was the biggest mistake of his career.

“I’m not going to name any names,” James told ESPN’s David McMenamin. “But there were some people that I trusted and built relationships with in those four years who told me I was making the biggest mistake in my career. That right there was my motivation.”

But as O’Neal’s situation with the Heat has shown, time apart helps.

“When things come to an end, you don’t take it personal,” Riley said Wednesday. “That’s all there is to it. My tenure in Los Angeles didn’t end well. My tenure in New York didn’t end well. I just hope my tenure in Miami ends well. I got over it quick. I love Shaq and I really do. He’s a great guy. … He’s going to tell you exactly what he thinks. I’m going to tell you exactly what I think. That’s one of the things that we had as a team in 2006. We had a team of players that had opinions … There’s no hard feelings at all.”

If the Heat take the same approach with James, his No. 6 jersey will be hanging from the AmericanAirlines Arena rafters at some point down the road.

“Time heals all, my man,” former Heat center Alonzo Mourning said of the organization’s relationship with O’Neal. “Obviously there were some things said that we all wish we could have taken back. But when emotions are the way they were during that time, sometimes comments are made that you wish you could take back. But I’ll tell you, we haven’t forgotten his contribution to the organization, to the community as a whole when he was here.”‘

Most of these comments refer to O’Neal’s situation. But the message behind these comments points in one direction — maybe James will have his happy ending with the Heat, after all.