A few terrific minutes by the Toronto Raptors couldn’t make up for a night full of bad ones.

Harrison Barnes scored 26 points to lift the Sacramento Kings to a 126-124 victory over the shorthanded Raptors, who rallied from an 18-point deficit down the stretch before losing their third in a row.

Kyle Lowry blamed the Raptors’ poor defensive effort on communication.

“It’s something that can hurt your team and it can help you when we’re doing things the right way, but tonight we weren’t talking loud enough, we weren’t speaking and communicating loud enough,” Lowry said.

Pascal Siakam had 32 points to top Toronto (7-12). Fred VanVleet added 26 points, while Lowry scored 17 points before being ejected with two technicals with four seconds to play.

The six-time all-star vehemently denied doing anything to warrant the ejection.

“I do a lot of complaining and things of that nature, but you know I think I’m getting the short end of the stick on that one,” he said.

WATCH | Lowry ejection caps Raptors’ frustrating loss:

Sacramento defeats Toronto 126-124, Kyle Lowry ejected with only 4 seconds remaining in the game. 1:46

Was he given an explanation for the ejection?

“No, I didn’t. I didn’t do anything. I didn’t do anything wrong. And that’s that.”

Terence Davis and Yuta Watanabe chipped in with 12 points apiece.

The Kings (8-10) snapped a seven-game losing streak against Toronto and avenged an ugly loss to the Raptors on their home floor three weeks earlier.

The Raptors, who have used six different starting lineups in their last six games, were missing OG Anunoby for the second straight night (calf strain), and Norman Powell, who sat out with a knee contusion he suffered in Wednesday’s loss to Milwaukee.

WATCH | CBC Sports’ Vivek Jacob, Jevohn Shepherd reassess Raptors:

Vivek Jacob and Jevohn Shepherd break down the Raptors recent success after a slow start and what turned out to be a historic night as Kyle Lowry netted his 10,000th point with the Raptors franchise last night against the Milwaukee Bucks. 4:40

Coach Nick Nurse said Anunoby’s absence was felt against a bigger Kings team.

“It felt tough out there are times with some size issues and not just up front, just all around, wing and everything,” Nurse said. “But I dunno. I thought again, it was one of those games where we weren’t playing very well and we were searching for a lot of things.”

Earlier in the month in Sacramento, the Raptors roared back from a 19-point deficit to beat the Kings 144-123, recording a franchise high in points.

But down two key players, they couldn’t quite pull off another heroic comeback on Friday. After an early two-point lead, the Raptors trailed the rest of the way. A 17-point deficit in the second quarter became 18 points late in the third, and Toronto trailed 104-91 with one quarter left to play.

Nurse impressed with Watanabe

The Raptors made things interesting in the dying minutes. Watanabe, one of the positives on the night, connected on a three-pointer then grabbed a big rebound that led to a Lowry bucket to cap an 8-0 run that sliced Sacramento’s lead to 112-105 with 5:21 to play.

“He played great,” Nurse said of Watanabe. “He played about as good as he could, I think he was really battling on D, he was really battling on the glass, made a couple of kick-out shots, made a tough shot-clock-winding-down drive to the basket which was good to see.

“He was really, really good.”

WATCH | Lowry reaches new plateau in Raptors franchise scoring ranks:

Kyle Lowry joins Chris Bosh and DeMar DeRozan as the only players to record 10,000 points with the Toronto Raptors. 0:34

VanVleet zig-zagged through the defence to score, then Watanabe connected on a jumper to pull Toronto to within a point with 1:08 to play. Kings rookie Tyrese Haliburton replied with a three-pointer. Lowry’s short jumper cut it to two again, but Sacramento free throws put the game away.

“Things are turning in the right direction,” Barnes said. “There’s some joy in being in these games and winning, but there’s no time to sit back and relax. We have to keep that edge and keep hustling.”

Barnes was a perfect 3-for-3 from distance in the first quarter and his long bomb at the buzzer capped a 12-2 Kings run that had the visitors up 36-24 to start the second.

The Kings stretched their lead to 17 points early in the second quarter, but the Raptors replied with a 14-4 run to make it a seven-point game. The Raptors would pull to within seven three more times in the quarter, but trailed 68-58 at the halftime break.

The Kings maintained a double-digit lead through the third quarter, and a layup by former Raptor and Canadian Cory Joseph had the visitors up by 18 late in the frame.

The Raptors host Orlando on Sunday to cap their three-game homestand.