Nets interim coach P.J. Carlesimo said following Monday’s practice that his habit of benching Brook Lopez in the fourth quarter — something he had done three out of the four games since the All-Star break — would come to an end.

Sure enough, Carlesimo sent his center back into the game with 5:09 remaining Tuesday night, and Lopez made sure he looked good for doing it.

Lopez proceeded to score the next six points for the Nets, helping them to secure their 101-97 victory over the Hornets.

“I’ve kept my confidence through this entire week,” Lopez said after finishing with 20 points, seven rebounds, five assists and four blocks. “It’s definitely good to get a win like this, but I try not to put too much stock into one game. ... It is a marathon and not a sprint.”

That may be the case, but heading into the game Lopez had been out of sorts ever since returning from his first All-Star Game last weekend in Houston. Other than a 27-point performance in a loss to Houston Friday, Lopez had gone a combined 12-for-40 in the other three games, sitting for all but 6.7 seconds of a possible 36 fourth-quarter minutes.

Perhaps it just took facing off against his twin brother Robin, the starting center for the Hornets, to get him back on track.

“It’s always fun,” Brook Lopez said of facing off against his twin, who finished with 14 points, seven rebounds and two blocked shots. “[Robin’s] always very physical. Playing against him is enjoyable. ... How many other people in the world get to experience something like this?”

The two brothers had a large cheering section in the stands, as their mom, Debbie Ledford, was cheering them on alongside their older brother, Alex, and his family.

Brook had said before the game his mom would be wearing either a Nets hat with a Hornets shirt or vice-versa, and she did exactly that, wearing a black Nets hat to go with a black Hornets T-shirt.

“It’s difficult, because they play the same position, they play the same minutes,” Ledford told The Post. “So, if anything happens, they kind of cancel out each other out. ... One is successful at the expense of the other.