Three men convicted of grooming girls for sex in a case that fuelled racial tensions in Britain face deportation to Pakistan after an appeals court upheld a government decision to strip them of British citizenship, The Guardian reported on Wednesday.

The ruling by the Court of Appeal clears the way for the men, all of Pakistani nationality, to be removed from Britain and be possibly deported to Pakistan. They had acquired British citizenship by naturalisation.

Abdul Aziz, Adil Khan and Qari Abdul Rauf were among nine men of Pakistani and Afghan descent convicted of luring girls as young as 13 into sexual encounters using alcohol and drugs. They were based in Rochdale, in northern England.

Read: The fate of migrants and Muslims in post-Brexit Britain

The three men were jailed in May 2012 but were later released on licence. The gang's ringleader, Shabir Ahmed, was sentenced to 22 years in jail and remains in custody.

Aziz, Khan and Rauf were convicted on conspiracy and trafficking for sexual exploitation charges. Aziz was not convicted of having sexual intercourse with any child.

The case centres on a decision by Prime Minister Theresa May, when she was home secretary, to strip the men’s citizenship “for the public good”.

The men had challenged the government decision at two immigration tribunals, arguing revoking their citizenship would violate their human right to a family life, as they have children living in the UK. Their appeals were dismissed.

The convicts then approached the Court of Appeal, senior judges of which ruled on Wednesday that the previous tribunals had made a "proper and lawful assessment" of the likelihood of deportation.

Also read: Brides for sale: Pakistani men involved in trafficking for sham marriages

A person can be deprived of British citizenship for the public good on the grounds of “involvement in terrorism, espionage, serious organised crime, war crimes or unacceptable behaviours”.

After serving their sentences, the three convicts will have a further legal right to appeal their deportation and the process could take months, according to the BBC.

It quoted a Home Office spokeswoman as saying: "This was an appalling case. We welcome the court's finding and will now consider next steps."

The five victims of the gang who gave evidence in the 2012 trial were all white, and spoke of being raped, assaulted and traded for sex, being passed from man to man, and sometimes being too drunk to stop the abuses.

The men, ranging in age from 22 to 59, used various defences, including claiming the girls were prostitutes.