The locker room was rowdy, the Pelicans players buzzing. Their chatter was so loud that coach Alvin Gentry had to shush his players before he could address them.

And that was before New Orleans knocked off the Cleveland Cavaliers 114-108 in overtime Friday night at the Smoothie King Center.

“This is the first time Coach (Alvin Gentry) told us to shut up when he came in the meeting before the game,” forward Anthony Davis said after his 31-point, 12-rebound performance helped pace the Pelicans to the win. “We were just talking loud, just good spirit. He was like, ‘All right, guys, shut up.’ That’s the first time. He was like, ‘That’s a good thing.’ We’re just starting to gel. We’re just starting to play for each other.”

That spirit showed on the floor Friday night, and everything clicked for the Pelicans.

Eventually.

Before they could make some more noise in the postgame, they first had to survive an onslaught from Cleveland’s LeBron James, who scored 37 points — including 21 of the Cavaliers’ last 24 in the fourth quarter — and led his team all the way back from a 13-point fourth-quarter deficit.

James’ heroics sparked a 20-4 run that gave the Cavaliers a 101-98 lead with 1:15 to play in regulation, and his free throws with 15.5 seconds to play put the Cavaliers in front 105-102.

But Jrue Holiday’s 3-pointer with 8 seconds to play tied the score — “Jrue made the play; it wasn’t anything that we drew up,” Gentry said — and Davis took over in the extra session.

Davis scored six points in overtime, including a floater to open the extra session that put the Pelicans in front to stay at 107-105.

“The leader, man,” Holiday said. “He took over the game, and that’s what we needed.”

It was a spectacular finish to a day that, for Davis, was good from the start.

As Davis waited to meet the media after the Pelicans’ morning shootaround, he listed as forward Dante Cunningham strolled into the locker room singing the theme from teen-TV staple “Dawson’s Creek” — “I don’t want to wait for our lives to be over ...” — and urged Cunningham to keep it up.

He laughed with teammates. He told reporters, “I think tonight’s going to be a good night for us. I kind of just feel it.”

And Davis got as good of a night as he could have hoped, one with enough drama to satisfy even those kids from the Creek.

The Pelicans trailed by 11 in the first quarter and led by 13 in the fourth, then battled back after James — who had eight assists and seven rebounds to go with his 37 points — almost single-handedly brought his team back from the brink.

New Orleans got 19 points from Eric Gordon and 18 from Ryan Anderson. It got 13 points, seven rebounds and five assists from Holiday in a new role off the bench.

The Pelicans “made a couple of defensive slip-ups” down the stretch, Gentry said, including allowing center Omer Asik to get caught on James on the perimeter twice in the closing minutes.

But a defensive effort keyed by Dante Cunningham held James to 13-of-29 shooting and made some of those fourth-quarter shots difficult.

He made those, too. But the Pelicans found a way to overcome it.

Davis helped. His steal and dunk with 45.1 seconds to play put the Pelicans in front 102-101 before James scored four straight for a 105-102 lead that set up Holiday’s heroics.

Holiday’s 3-pointer was on a play designed for Ryan Anderson that the Cavaliers took away. So Holiday sidestepped and got Matthew Dellavedova leaning slightly. Holiday took a step left and launched.

“Right when I let it go, it felt good,” Holiday said. “That’s probably why I held my follow-through up so long.”

It was a shot worth admiring and a game worth celebrating, the sort of outcome that keeps those good pregame vibes going. But only for so long. Gentry wants his team to have more reasons to be raucous in the coming games.

“If we play my alma mater, we need a win,” Gentry said. “We just got to try to find a way to come up with some wins — and to get a quality one like that is good — but I still say for us it’s really important that we build on this, that we don’t take a step backwards.”