For one night, the Nets ruled their slice of the NBA.

In a lost season in which the arena has often been filled with jerseys from the opposing squad, Barclays Center finally belonged to the team whose name is on the hardwood. Friday night, the Nets were kings of their own court, kings of that free-flowing offense that Tony Brown talks about so much and kings of . . . well, the Sacramento Kings.

They dominated from beyond the arc, let their frontcourt — potent, on a good day — do the talking, and made DeMarcus Cousins’ triple-double look like little more than a mild inconvenience.

The Nets hit a season-high 18 threes on the way to a 128-119 win over the Kings at Barclays Center, and had three players — Joe Johnson, Brook Lopez and Thaddeus Young — register double-doubles. They snapped a five-game losing streak.

“The ball was moving so well, especially from the second half on, and we got great looks out of it,” Lopez said. “We backed up the ball defensively. We were all there for each other and we played almost the entirety of the game.”

Cousins had 24 points, 10 assists and 10 rebounds and Johnson led all scorers with 27 points and 11 assists. The Kings, who came into the game allowing a league-high 10.4 threes per game, have yet to win at Barclays in four tries.

The 18 threes are the third-most in franchise history, helped along by Bojan Bogdanovic, who had a career-high seven threes (in nine attempts) and ended up with 23 points off the bench.

Other season highs included points, field-goal percentage (.558) and three-point percentage (.643). All five starters scored in double digits: Young had 14 points and 14 rebounds and Lopez had 26 points and 12 rebounds.

The Nets made nine of their 12 three-point attempts in the first half — the most threes they’ve hit in any half this year — but still led only 65-61 at the break. They had a 13-point advantage a minute into the second quarter before the Kings strung together a 13-4 run. Cousins’ driving layup and left-wing three eventually gave the Kings their first lead since midway through the first quarter — a 50-49 advantage with 4:39 left in the first half. The Kings ended up leading by three before Johnson’s floating jumper was good for the first of three ties in the final three minutes of the half.

But where the Nets have been known to wilt this year, instead they thrived. They opened up a 22-point lead toward the end of the third quarter, outscoring the Kings 38-24 in that frame.

“We got our confidence and we started to run the floor,” Bogdanovic said. “We shared shared the ball well and it was easy at the end for us.”

It isn’t too common a sight at Barclays — cheering fans in the fourth quarter, big numbers and an easy win — but it’s certainly one they welcome.