Rookie Brandon Miller made seven 3-pointers and finished with 31 points, and the Charlotte Hornets beat the Cleveland Cavaliers 118-111 on Wednesday night to avenge a 23-point loss earlier in the week.

Miles Bridges and Tre Mann added 17 points and Grant Williams had 16 for the Hornets, who shot 58% from the field to snap a five-game losing streak. Vasa Micic had 11 points and 12 assists, and Nick Richards added 11 points and 10 rebounds.

Jarrett Allen scored 24 points and Sam Merrill added 17 for the Cavs, who have lost four of their last five games. Allen became the first Cleveland player in four games to top 20 points.

The Cavaliers beat the Hornets 115-92 on Monday night in Cleveland after Marcus Morris Sr. was ejected after throwing a high elbow that flattened Richards.

The Hornets, who were beginning an eight-game homestand after playing 13 of 17 on the road, played inspired from the start.

During one stretch in the fourth quarter, Charlotte had four chances to score after two offensive rebounds by Williams kept the possession alive, eventually resulting in Miller finding an open lane down the middle and slamming home a one-handed dunk.

Darius Garland’s pull-up 3 from the top of the key gave the Cavaliers a 107-105 lead with 6:47 left in the game and it appeared the Cavs might be on the verge of pulling away.

But the Hornets stayed close and regained the lead with two minutes remaining when Miller fed Miles Bridges for an alley-oop dunk in transition and then hit a one-handed floater.

The Cavaliers hurt themselves with mistakes in the final 1:04 with Allen missing two free throws and two turnovers, including Caris LeVert being whistled for traveling.

Cleveland didn’t score in the final 3:28 of the game.

Miller, who was 7 for 13 from beyond the arc, put the Cavs away with a 3 with 25 seconds left.

The Cavaliers will next host the Philadelphia 76ers on Friday, March 29th, with tip-off at 7:30 p.m.