Don't mess with Mel B! Simon Cowell learned that the hard way on "America's Got Talent" after he made fun of the singer's failed marriage.

Cowell was giving feedback after an escape artist's act was ruined by technical difficulties. He said, "I kind of imagine this would be like Mel B's wedding night. A lot of anticipation, not much promise or delivery."

Quickly, Mel B got up and threw a cup of water at Cowell's face before storming off the stage. She returned to her judge's chair for the next performance.

Get Breaking News Delivered to Your Inbox

The subject is a touchy one, as Mel B filed for divorce from her husband Stephen Belafonte in March and alleged that he abused her.

"He should know, if you say something inappropriate he's gonna get, like, stuff thrown at him," Mel B said to ET. "In a friendly way. I made sure there was no ice in it this time … just fizzy water."

Cowell apparently took it in good stride.

"I told him he was an a**hole and that was it, and he goes, 'Oh, whatever,'" Mel B told ET.

This is not the first time Mel B has thrown water at Cowell on the show. During the audition rounds, Cowell joked that she was able to get famous without knowing how to dance, prompting her to throw her water at him.

Host Tyra Banks alluded to the incident on Twitter and said, "So much went wrong but that's what makes live TV so cray!"