Kobe Bean Bryant, 37, played the final game of his 20-year career Wednesday, ending an era with five championships, 18 All-Star game appearances and way too many outsiders’ opinions, pro or con, to ever tally.

His 1,556th and last box score showed a stunning 60 points on 22-for-50 shooting in a 101-96 Lakers victory over the Utah Jazz.

It was chaotic, it was beyond memorable, it was so very Bryant.

The raucous crowd couldn’t care less about the final score, cheering with piercing volume every time Bryant scored during his 42 minutes.

“Man!” he exclaimed after the game when handed a microphone at midcourt. “I can’t believe how fast 20 years went by. This is crazy. This is absolutely crazy.

“We’ve been through our ups and we’ve been through our downs. I think the most important part is that we stayed together throughout.”

About 25 of Bryant’s former teammates were at the game, including a Hall of Famer (Shaquille O’Neal), noteworthy ex-champions (Robert HorryRick FoxLamar Odom and Derek Fisher) and plenty of others (Chris MihmDJ MbengaAdam Morrison and Mike Penberthy).

As a goodbye gift, the Lakers gave Bryant a championship-like ring with five large diamonds on it (one for each title he won) and 20 smaller diamonds (one for each of his playing years). They gave the same ring to his wife, Vanessa, who sat across from the Lakers’ bench along with the couple’s two daughters.

The Lakers handed out around 450 to 500 media credentials, approaching the allotment for an NBA Finals game.

Magic Johnson was the only former player to speak before tipoff in a relatively brief ceremony (as per Bryant’s wishes).

“Kobe Bryant has never cheated the game. He has never cheated us as fans,” Johnson said. “He has played hurt and we have five championship banners to show for it. When you think about this town for the last 20 years, this man has been the biggest and greatest celebrity we’ve had…. He’s the greatest to wear the purple and gold.”

Numerous celebrities prerecorded words of gratitude shown on the scoreboard during timeouts.

Among them were rappers Snoop Dogg and Ice Cube (they were cheered), singer Justin Bieber (he was booed), Kanye West and Kim Kardashian (also booed) and Taylor Swift.

Said Ice Cube: “Kobe, baby, give us five more years. Come on, you can do it.”

It was fitting that Bryant’s last game came at Staples Center, where he once scored 81 points against Toronto on a Sunday night in January 2006/

It was the place where he once outscored the Dallas Mavericks through three quarters, 62-61, where he lobbed the ball to O’Neal in 2000 for the dunk that started a mini-dynasty, and where he got revenge in 2010 against the Celtics.

And yet, Bryant had his share of career setbacks.

He and O’Neal couldn’t get along, to put it mildly, leading to O’Neal’s ouster in 2004 and years of playoff ineptitude.

That turned around with the Pau Gasol acquisition in February 2008, which created championships in 2009 and 2010, but Bryant’s knee became a problem in 2011 and his Achilles’ tendon blew out in 2013. He was never close to being the same after the latter, though the Lakers gave him a two-year, $48.5-million contract extension in November 2013 while he was still rehabilitating.

That he made it through 66 games this season was somewhat of a medical marvel. He led the team in scoring (around 17 points a game) but became overly dependent on his long-distance game — never his forte — and shot about 35% for the season.

There was a game too, Wednesday. It was kind of meaningless. That is, until Bryant started heating up in the second half.

The Lakers already clinched their worst record ever (17-65) and Utah’s playoff chances ended before tipoff because Houston beat Sacramento.

Bryant didn’t start well, missing his first five shots before hitting a 10-footer off a pump fake from the left side.

He took a surreal 21 three-point attempts, making six of them, and his last shot was a 20-foot pull-up with 31.6 seconds left, giving the Lakers a 97-96 edge. He added two free throws and an assist, his fourth of the game, with a length-of-court pass to Jordan Clarkson for a dunk.

“This has been absolutely beautiful,” Bryant said afterward, right before a yellow confetti storm took place in the arena. “I can’t believe it’s come to an end.”