The former Spice Girl filed a sworn declaration stating Stephen Belafonte subjected her to emotional and physical abuse

Receive the latest entertainment-news updates in your inbox

Singer Mel B and husband Stephen Belafonte attend the premiere of IFC Midnight's "Intruder" at Regency Bruin Theater on June 15, 2016 in Westwood, California. She has recently filed for divorce.

A judge has granted singer Mel B a temporary restraining order and sole custody of her youngest daughter after she claimed her estranged husband subjected her to years of abuse.

The order was granted Monday after the former Spice Girl filed a sworn declaration stating Stephen Belafonte subjected her to emotional and physical abuse throughout their relationship and threatened to leak sex tapes of her.

Mel B, whose real name is Melanie Brown, wrote that Belafonte's abuse often occurred after high-profile events, including punching her following her appearance on Australia's version of "X Factor" in July 2012 and again days after she performed with the Spice Girls at the London Olympics.

Court records filed in their divorce do not include a lawyer for Belafonte, and attempts to find a representative for him were unsuccessful.