A group of Iranians, including a nine-year-old girl, have taken three high-street UK banks to court for what they believe is a misreading of sanctions policy, alleging they have been subjected to racial discrimination after being told that their accounts had to close.

RBS, NatWest and Lloyds have sent letters to a number of their customers, including British citizens with Iranian backgrounds or Iranians living in the UK, saying the banks can no longer provide financial services to them, citing sanctions in most cases.

Blackstone Solicitors, a law firm representing about 20 Iranians, said it had issued proceedings against the banks and was seeking damages. The firm said it initially acted on individual cases but had now asked the court to grant a group litigation order.

"It is our strong opinion that the closures are based on ethnicity," said the firm's managing director, Emma Nawaz. "All of these clients are of Iranian heritage, but many have UK passports and all of them are domiciled in the UK … These ordinary people who contribute to society are becoming victims of racism by high-street banks … This is ethnic profiling in the UK."

Nawaz said her clients included a nine-year-old girl who holds a UK passport. RBS and NatWest have agreed not to close the accounts until a final decision in the case in the courts or under a settlement, Nawaz said.

The allegation of racial discrimination is against all three banks, according to Blackstone, which said it might act on similar cases in other UK banks too.

"It's a matter of principle. I don't think many of my clients are actually after money … what they want is a decision that the banks are wrong in closing the accounts and it is racial discrimination, that banks can't close accounts like this. They want a court order to confirm that," she said.

Many services are denied to Iranians not because providers are legally bound to refuse them under international sanctions but because they err on the safe side for fear of running foul of the policy. Ordinary Iranians have complained in recent years that blanket sanctions have hurt them in many areas such as importing life-saving medicines.

In the majority of cases, the banks have indicated the closures had to do with sanctions, Nawaz said.

"To some extent, they are misreading sanctions as to what a direct and indirect transfer is, but in my opinion they are also directly discriminating against people who have connections with Iran so anybody of the Iranian race is being discriminated against even if they haven't been transferring money," she said.

"I have many clients who have never transferred any money outside the UK to any other countries, never mind the countries that the bank considers as high risk. I have clients who have not transferred outside the UK, all the banking has been within the UK, and they have had their bank accounts closed because the bank considers that they are at risk of breaching sanctions because of their connections to Iran. What Iranian person doesn't have, or what British-Iranian person doesn't have, connections with Iran?"

Sanctions do not prohibit ordinary Iranians bringing their money to the UK, but banking restrictions mean there is no normal way to do so.

Blackstone said a claim made under the Equality Act must be brought within six months of the alleged discrimination, meaning those who had had their accounts closed a long time ago could not act now.

Justice for Iran, a human rights group based in London that has documented abuses by the Iranian authorities, said it had not been able to open a bank account in the UK because its name included the word Iran.

Alireza, a 35-year-old Iranian chemical engineer living in Surrey, said his bank account had been closed in January 2013 when he was a PhD student. "I've since been able to open an account in a new bank but this closure has so badly hurt my credit history that I won't be able to get a mortgage for a long time," he said.

Lloyds said in a statement: "While we cannot comment in detail on specific cases, it is important to stress that Lloyds Banking Group does not close accounts based on ethnicity; indeed, we do not ask our customers to disclose this information to us.

"Closure of an account is never a decision we take lightly. Our account-closing procedures involve careful consideration of relevant information available to us at the time and notice to the customer in advance of closure."

An RBS spokesperson said: "We are required to comply with our legal and regulatory obligations and are unable to comment on specific customers or decisions made in relation to individual accounts. However, we strongly refute any claims that we have made any such decisions in a discriminatory way. We confirm that we would never close a customer's account based on their race and that any UK resident can apply to open an account with the bank."