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

In a lost season in which the arena often has been filled with jerseys from the opposing squad, Barclays Center finally belonged to the team whose name is on the hardwood. On 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 three-pointers on the way to a 128-119 win over the Kings 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.”

Johnson led all scorers with 27 points and 11 assists. Lopez had 26 points and 12 rebounds and Young added 14 points and 14 rebounds.

advertisement | advertise on newsday

Cousins had 24 points, 10 assists and 10 rebounds. The Kings, who entered the game allowing a league-high 10.4 three-pointers per game, are 0-4 at Barclays.

The 18 three-pointers are the third-most in franchise history. Bojan Bogdanovic hit a career-high seven threes (in nine attempts) and scored 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.

The Nets built a 13-point advantage a minute into the second quarter before the Kings strung together a 13-4 run, and Sacramento crawled back into a three-point lead late in the half.

But the Nets opened a 22-point lead toward the end of the third quarter, outscoring the Kings 38-24 in that frame.

Brooklyn Nets videos

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