December 29, 2022 | 4:49pm

Offset and Cardi B hit the club early Thursday morning, perhaps to celebrate a legal win.

Spies tells us the famed husband and wife were spotted at nightclub Nebula’s Wednesday night party, Nite Show.

“They came at 1.30am,” says the witness, who adds that the couple spent over two hours dancing to music from DJ Club and DJ Spade.

“Cardi B was drinking Coronas and Offset made sure their table had Clase Azul, 1942 and Ciroc,” says the spy.

The rappers capped off their evening by driving past Cardi B’s new Reebok ad in Times Square.

Earlier that day, a judge upheld Cardi’s win in a lawsuit brought against her by Kevin Brophy, whose back tattoo was featured on the cover of her 2016 “Gangsta Bitch Music Vol. 1.” He has been ordered to pay her legal fees.

A judge upheld Cardi’s win in a lawsuit brought by Kevin Brophy, whose back tattoo was on the cover of her album, “Gangsta Bitch Music Vol. 1.”

The ruling was first announced on Oct. 21, but Brophy’s request to have it overturned was “rejected on the grounds it lacked merit and was filed too late,” according to a report in Complex.

Trey Songz, Coi Leray and DreamDoll were also among the sold out crowd at the club.

The “Bodak Yellow” hitmaker and Offset, who have had something of a tumultuous marriage, have been having a good holiday, it seems. On Tuesday, they were seen hitting the indoor slopes at Big SNOW at New Jersey’s American Dream mall with daughter Kulture, 2, 15-month-old son Wave Set and Offset’s son Jordan. 13.

“The reason I gotta go hard,” Offset captioned an Instagram pic of him and his children.

On New Year’s Eve both Cardi B and Offset will perform at midnight at Miami’s E11even.