The Nets came up with the perfect response to their pathetic showing in Portland: they made the Nuggets look even worse.

Brooklyn dominated Denver right from the opening tip, outscoring the Nuggets 29-8 in the first quarter and cruising to a 112-89 victory inside the Pepsi Center Thursday night.

“They pretty much did what we did last night,” Deron Williams said. “So there it is.”

With the win, the Nets (27-29) moved a half-game ahead of the Bobcats for sixth place in the Eastern Conference, and moved back to within four games of the Raptors for first place in the Atlantic Division. They also gave themselves a chance to finish their six-game, two-week Western road trip with a 4-2 record, if they can knock off the league-worst Bucks in Milwaukee Saturday night.

After Wednesday’s 124-80 loss in Portland, the Nets spoke about the need to bounce back against the Nuggets (25-32) Thursday, especially given the Nets’ season-long struggles in second halves of back-to-back games, entering Thursday’s game with a 3-10 record in them.

But if there was any doubt about how the Nets would respond against the Nuggets, who were missing Ty Lawson (ribs) and former Knick Wilson Chandler (knee) in addition to several long-term injuries that left them with just nine healthy players, it only took a few minutes to see how the game would play out. The Nets went on to have the third-biggest points swing from a loss to a win on back-to-back nights in NBA history — and the biggest in Nets history — in a game that was over almost before it began.

“Well, [Nets coach Jason Kidd] gave us a great talk today,” Joe Johnson said. “He chewed us out about last night, about the poor performance defensively and not moving the ball offensively.