Mel B. Picture: AP

Mel B stormed off 'America's Got Talent' after Simon Cowell made a joke about her wedding.

The trouble started when Simon, 57, critiqued escape artist Demian Aditya's performance during Tuesday's show by saying, "I kind of think it will be like Mel B's wedding night. A lot of anticipation, not much promise."

READ: Heidi Klum and Seal reunite on reality show #AGT

Mel - who is currently going through a bitter divorce from her second husband Stephen Belafonte - was outraged and poured her mug of water all over Simon before storming out.

Host Tyra Banks said: "Mel B is out. This is live TV, all. Live TV," while judge Howie Mandel added, "Something just went wrong."

Despite the drama, Mel, 43, eventually returned for the remainder of the show.

Mel filed for divorce from Stephen earlier this year and was granted a restraining order against him after she accused him of abusing her, getting their nanny pregnant and forcing her to take part in threesomes. 

The star has three daughters - five-year-old Madison with Stephen, Phoenix, 18, from her first marriage to Jimmy Gulzar and Angel, 10, from a relationship with Eddie Murphy - and she and Stephen are currently locked in a custody battle.

A judge recently ruled that Stephen can apply for custody rights to his stepdaughter Angel after he argued he played a significant role in raising her and is keen to be able to retain contact with her in the future.

In a hearing in Los Angeles, Judge Riff said: "Mr. Belafonte claims it's in the child's best interests for him to have contact, frequent and continuing, with the child he says he raised from an infant.

"The petitioner says it is clearly not in that child's interest. Those are the assertions."

An insider said the 42-year-old producer - who has monitored visitation with his and Mel's five-year-old daughter Madison - was delighted with the ruling.

The source explained: "He has raised Angel as his own. He's the only father she has ever known.

"God knows what this poor child is thinking. Stephen is looking forward to the day he can see both girls together. His kids are all that matter to him."