UCLA coach Mick Cronin had a talk with Donovan Dent before the Bruins faced No. 4 Purdue.

Cronin told Dent to quit being a bystander, get in the ring and throw some punches.

“You gotta perform, man,” Cronin reminded Dent. “Your team needs you.”

Dent listened.

He played his best basketball of the season, finishing with a double-double — 23 points and 13 assists — including a key pass to Tyler Bilodeau with eight seconds left in the game. Bilodeau hit a clutch three-pointer, sealing the gutty Bruins’ stunning 69-67 upset of Purdue (17-2, 7-1) Tuesday night at Pauley Pavilion.

Cronin spent much of the past month pleading with his team to play with greater intensity and consistency. UCLA (13-6, 5-3 Big Ten) delivered enough to earn a signature victory, inspiring fans to flood the court after the final buzzer.

“We’re still struggling to get the rebound,” Cronin said.

UCLA played five of its first seven Big Ten games on the road, including an ugly road loss to Ohio State on Saturday, prompting Cronin to thank the conference for dealing his team a scheduling hurdle.

Cronin said two Hall of Fame coaches reached out to him and questioned why they were playing in Los Angeles after playing in Ohio a few days ago.

“It couldn’t be much worse,” he said.

UCLA guard Donovan Dent celebrates after scoring during a win over No. 4 Purdue on Tuesday at Pauley Pavilion.

UCLA guard Donovan Dent celebrates after scoring during a win over No. 4 Purdue on Tuesday at Pauley Pavilion.

(Jae C. Hong / Associated Press)

The Bruins opened the game sluggishly, missing their first three shots, Trent Perry the only Bruin to score for the first 5½ minutes as Bilodeau, Dent and Eric Dailey Jr. all missed shots.

As the game progressed, the Bruins turned it on and built momentum, with Dent hitting a jumper at the buzzer to tie the score at 32 at halftime.

The second half turned into a shootout, with the teams frequently trading the lead. Dent delivered the offensive spark Cronin tried to stoke.

“I think that’s the response he wanted right there,” Dent said. “Being able to come back out and not back out.”

UCLA fans storm the court after the team defeated No. 4 Purdue at Pauley Pavilion on Tuesday.

UCLA fans storm the court after the team defeated No. 4 Purdue at Pauley Pavilion on Tuesday.

(Jae C. Hong / Associated Press)

Purdue was nearly perfect from the free-throw line (six for seven), but turnovers in the final minutes helped seal the Boilermakers’ first Big Ten loss of the season.

Purdue led 67-61 with 1:56 left. Dent hit a three-pointer to cut the deficit, then Trent Perry stole a bad pass by Purdue’s Braden Smith. Dailey hit a layup to cut the Bruins’ deficit to one point with 1:05 remaining.

“I want to thank the fans, first off, because they brought the energy that we needed to play with,” said Dailey, who finished the game with 12 points and seven rebounds.

After a Boilermakers timeout, Purdue’s Smith threw the ball away and UCLA called a timeout to set up its offense. Dent received the inbound pass, found Bilodeau on the perimeter and he nailed a three-pointer to give the Bruins a 69-67 lead with eight seconds remaining.

UCLA forward Tyler Bilodeau fires up the crowd after the Bruins defeated No. 4 Purdue on Tuesday at Pauley Pavilion.

UCLA forward Tyler Bilodeau fires up the crowd after the Bruins defeated No. 4 Purdue on Tuesday at Pauley Pavilion.

(Jae C. Hong / Associated Press)

“I was hyped up,” Bilodeau said after hitting the shot.

UCLA took another timeout to set up its defense. Purdue’s C.J. Cox missed a 26-foot three-pointer and Xavier Booker grabbed the defensive board at the buzzer to seal the Bruins’ biggest win of the season.

The victory was a team effort, with Bilodeau finishing with 14 points. Booker had nine points, four rebounds and three blocks. During the past six weeks, the Bruins hadn’t earned more than six blocks in a game, but they finished with eight against Purdue.

After losing three of the last five games, Cronin said he couldn’t give all his players individual pep talks and instead shared his goals with the whole team.

“You think they have one-on-one meetings in the Marines and basic training and SEAL training?” Cronin asked.

Cronin was asked whether he was satisfied with his team’s effort and would have been content if the Bruins missed their last shot and failed to capture the big upset.

“I’d have been pleased if Tyler missed the shot and we lost,” Cronin responded. “I just want us to fight. I thought we fought.”