Melanie “Mel B” Brown left the set of “America’s Got Talent” after fellow judge Simon Cowell made a crude remark about her wedding night.

>> Read more trending news

The former Spice Girl is currently in the middle of a messy divorce from Stephen Belafonte that includes allegations of  her being abused by Belafonte. She was in no mood for Cowell's jokes.

Cowell made the crack after a magician suffered technical difficulties during his live performance.

Related: Singer Mel B alleges abuse in restraining order against ex amid divorce

“I kind of imagine this would be like Mel B’s wedding night,” Cowell said. “A lot of anticipation, not much promise or delivery.”

Brown was not amused by the joke and threw her glass of water at Cowell before storming off stage.

Related: Singer Mel B divorcing husband of nearly 10 years

“Mel B is out,” host Tyra Banks said after the incident. “This is live TV, y’all. Live TV.”

Brown spoke to Entertainment Tonight following the incident and said of Cowell, "He should know, if you say something inappropriate, he's gonna get like, stuff thrown at him."