Donald Trump
Donald Trump, former owner of the Miss Universe Organization, poses with Miss Connecticut Erin Brady at a news conference after she was crowned Miss USA 2013 at the Planet Hollywood Resort and Casino in Las Vegas, Nevada June 16, 2013.REUTERS

Republican presidential candidate Donald Trump and Univision have finally reached a settlement agreement over a $500m (£345.5m, €442m) lawsuit brought against the Spanish-language network over its decision not to broadcast the Miss Universe and Miss USA beauty pageants.

Trump sued Univision in June 2015 after the network refused to air the pageants due to racist remarks he made towards Mexican immigrants. The bombastic presidential hopeful partly owned the pageants at the time. The settlement was announced in a joint statement, but the terms of the deal were not disclosed, CBS News reported.

"I have known Univision's President and CEO, Randy Falco, for more than 20 years and I'm glad we are able to put these differences behind us," Trump said in the statement released by the network. Falco added that he and Trump were "pleased to settle this matter and move forward."

The lawsuit, which cited breach of contract and defamation, arose from comments the real estate mogul made on 16 June announcing his candidacy. During his comments, Trump accused neighbouring Mexico of sending rapists and other criminals across the border. "They're bringing drugs, they're bringing crime, they're rapists, and some I assume are good people, but I speak to border guards and they tell us what we are getting," he said.

Following his remarks, Univision and NBCUniversal announced they would not air the Miss USA or Miss Universe pageants, which were co-owned by Trump and NBCUniversal at the time. NBC also announced that it would replace Trump of the reality show The Celebrity Apprentice with former California Governor Arnold Schwarzenegger. Trump had already stepped down as host to pursue his political career. In response, Trump called for a boycott of Univision and banned its employees from his Miami hotel.

The settlement announcement comes on the heels of Trump's incredible win in the New Hampshire and just days ahead of the next Republican debate on 13 February.