A mother-of-two fears her UKIP candidate ex-husband is “brainwashing” her children into becoming racist and homophobic.

The mother claims her ex-husband, who cannot be named for legal reasons, is “abusing their childhood” by “pumping them full” of UKIP beliefs.

She claims “99.9 percent of parents” believe children should not be involved in politics.

Her allegations emerged after the UKIP candidate was banned from taking his children to party meetings, as a judge claimed they were at risk of “emotional damage.”

The judge claimed the children would be at risk of witnessing hostility as “many people don’t like the party.”

The father said he saw the ban as “an attack on UKIP,” and said he felt “deeply insulted.”

In court documents, the fearful mother claims her ex-husband’s political views affected her eldest son the most, as she claims “he can be racist and homophobic.”

I've just heard that UKIP are not going to teach kids at school about homosexuality because they "might turn out gay". What the actual f — ❄cas❄ (@MATSUOKASRlN) March 3, 2015

The father encourages his children to distribute UKIP leaflets and promote the party when spending time with him.

OMG, UKIP leaflets don't show Farage, party leader has lost trust of party*. (*Not actually what I think). pic.twitter.com/arH0E0bmjK — Siraj Datoo (@dats) March 2, 2015

Their mother says it is “mentally challenging” for her children to face UKIP opposition, as one of them once had a leaflet ripped up in their face and another had an egg thrown at them while campaigning.

The child was “exceedingly amused” to have an egg thrown “somewhere near” their feet, the father claimed, adding they are “very keen” to campaign and “gets lots out of it.”

One of the children is already a member of UKIP’s youth wing and another is determined to join.

“They shouldn’t know what they are talking about because none of them at that age should know anything to do with politics,” the mother argued.

In a poll on Debate Wise, one user commented on the UKIP candidate’s inclusion of his children in campaigning.

“It will help young people to elect the right candidate and they will learn the importance of voting,” they said.

@Chaters17@WomenDefyUKIP@CarolineLucas Wrong to push politics on children. I'd even be against anti-ukip stuff being taught. — James (@JamesEdmonds90) March 3, 2015

However, one Twitter user said it is “wrong to push politics on children,” adding she would even be against anti-UKIP ideas being taught.

Not okay to take your child to a #UKIP meeting but okay to take to violent anti-UKIP protest? http://t.co/iNlojj9YDcpic.twitter.com/ZEb4WSz04J — Thomas Evans (@ThomasEvansUKIP) February 28, 2015

#UKIP policy to teach all children to "take pride in the British Empire"- not think critically and objetively. That is actual brainwashing! — Omar Nür-Nathoo (@OmarNurNathoo) February 18, 2015

Another user questioned the case on Twitter: “Not okay to take your child to a UKIP meeting but okay to take to violent anti-UKIP protest?”

The UKIP hopeful father accused his ex-wife of “indoctrinating” the children.

READ MORE: 'I have a problem with negroes': UKIP councillor expelled for racism has 'no regrets'

At a court appeal last Friday, the judge overturned the ban previously executed in a custody battle, saying the order was “invasive” of the “rights of the father.”

The judge who lifted the ban said the case should be brought back to court “if the parents still cannot reach an agreement.”

“This is a victory. People are fed of up being told how they are supposed to think,” the father said.

“Even if my children had picked up racism, which I do not accept they have, they have not picked it up from UKIP,” he added.

After the BBC aired its controversial docudrama Meet the UKippers, ComRes/ITV released a poll which revealed 44 percent of voters believe UKIP “has a racist agenda.”