The British National party was plunged into chaos yesterday, weeks before the general election, when a court ordered it to remove central beliefs and policies about race from its constitution.

In a landmark injunction at the Central London county court, a judge found that the BNP's membership policy remained discriminatory, even after a direct whites-only clause was removed last month.

The judge, Paul Collins, ordered the BNP to remove two clauses from its constitution as they were indirectly racist towards non-white would-be members.

The party also remains banned from signing up new recruits until it satisfies Collins it has changed the constitution, although it said last night that applications to join were being processed again.

In a further blow to the party's election hopes, it was ordered to pay an estimated £60,000 in legal costs. The bill could rise to £100,000 when its own legal fees are included.

While one offending clause is largely an administrative matter – a requirement that all new members agree to a vetting visit from BNP officials, something the judge found could intimidate non-white applicants – the other spells out core beliefs.

This is a requirement for members to believe in the "continued creation, fostering, maintenance and existence" of an indigenous British race and action towards "stemming and reversing" migration.

The BNP last month voted to remove a direct bar on non-white members after a legal challenge from the Equalities and Human Rights Commission (EHRC). The government equalities watchdog then challenged the revised constitution on the grounds that ethnic minority Britons could still not subscribe to the party's beliefs without "denying themselves".

Collins ruled in favour of the commission, ordering the BNP to remove the offending clauses by Monday afternoon or face potential legal penalties.

The EHRC head of legal enforcement, Susie Uppal, said: "Political parties, like any organisation, are obliged to respect the law and not discriminate against people who wish to become members."

The BNP's leader, Nick Griffin, said the decision "opens a very dangerous door. It's a huge change to the unwritten constitution of Britain. The judgment has given a government-appointed, taxpayer-funded quango the rights to change the aims and objectives of political parties." The costs award would "have some effect" on the BNP's election campaigning, but it would not be significant, he added.

Griffin said he had already amended the constitution so the clauses were removed from membership criteria. He insisted, however, that the beliefs about immigration and race would remain, even if members did not have to officially sign up to them. "It won't make any practical difference to us. But it's hugely symbolic," he said.

A spokesman for the anti-fascist campaign group Searchlight said: "This judgment is a personal humiliation for Nick Griffin. The BNP has been proven in court to be as racist and extremist as ever."

The millionaire Asian businessman Mo Chaudry, who had said he would apply to join the party to "fight them from the inside", welcomed the ruling. He said: "This was the only decision that could have been made today. There was no alternative."

The decision follows weeks of wrangling over the legality of the far-right party's membership criteria. After the EHRC challenge last year, BNP members voted at an extraordinary general meeting a month ago to scrap the whites-only clause. BNP critics argue the party has no genuine interest in recruiting non-white members and is doing the minimum to avoid legal action and court costs.

An internal BNP memo seen by the Guardian this week told members that the party had not "gone soft". It continued: "We don't expect any more than a handful of people of ethnic minority origin to apply to join the party nationally, and we will not let this deflect us from our political objectives of saving Britain and restoring the primacy of the indigenous British people."