Jay Z arrived in his customary courtside seats next to the Nets’ bench near the end of the first quarter, a bit too late for the unexpected fireworks between the guy who initially wanted to be in Brooklyn and another who had to be persuaded to waive his no-trade clause to come here.

Dwight Howard’s day, one that began with him hoisting shots on the herringbone court inside the Nets’ billion-dollar arena for the very first time, had just gotten more intriguing. Howard and Kevin Garnett became angry at each other during a brief altercation with 7:53 remaining in the quarter, with Garnett head-butting Howard and getting ejected.

Howard was the one smiling when the final buzzer sounded, though. Behind James Harden’s 30 points and six assists, the Rockets beat the Nets, 113-99, at Barclays Center. It was their season-high sixth straight loss.

As many in the crowd of 16,115 were still settling in, as evidenced by the pockets of empty chair backs dotting the lower bowl, Howard got fouled by Garnett while driving the baseline. Garnett wasn’t pleased, giving Howard a slight shove with his right arm. Howard retaliated by hitting Garnett in the upper chest area with his left hand.

That enraged Garnett, who fired the ball at Howard’s back and took two steps in his direction before head-butting him, sparking a brief confrontation. Howard swiped at Garnett with his right hand and the two had to be separated.

Nets director of team security Robert Masiello raced all the way over from their bench to help calm Garnett down. Even he had problems at first, unable to keep Garnett from wandering around aimlessly while barking choice words about Howard.

After a lengthy video review by the officials, each was hit with a technical foul and Garnett was given the heave-ho, leaving his teammates to fend for themselves while they tried to break out of one of their roughest stretches of the season.Nets coach Lionel Hollins said the referees told him Howard’s slap wasn’t a closed fist, which is why he wasn’t ejected. And Howard was still available to torture the Nets, providing them with another reminder of how things might’ve been.

“Those are the kinds of games you want to win, and we didn’t do that,” said Mason Plumlee (24 points, 10-for-11 shooting, 10 rebounds).

In the months leading up to the Nets’ move to Brooklyn in 2012, Howard initially made it known that this was his preferred destination, only to inexplicably opt into the final year of his contract and essentially renege on his decision, postponing his eventual free agency by a year.

That pretty much ended the Nets’ two-year “Dwightmare.” He was traded to the Lakers and spent a season in Los Angeles before landing in Houston in 2013 as a free agent.

“It was something at the time I thought would be the best move, but everything happens for a reason,” said Howard (eight points, five rebounds). “I was looking forward to one day being in Brooklyn at the time, but I found a great home in Houston. The team is playing exceptionally well. And we have a great opportunity to do something special.

“One thing I try to do is live without regrets. There was a point in time I thought this was the best place for me to play basketball. I think when I opted in, that kind of changed everything.

“But Houston is a great place. I love where I’m at. I found a great home.’’

“Even though I won’t be playing here in Brooklyn, I have a lot of family and friends. So it’s always fun to visit with those people.”