LONDON — Britain has granted permanent residency to a group of refugees who have been stranded for 20 years on a U.K. military base in Cyprus.

The Leigh Day law firm that represents the refugees said Monday that the government settled the case involving 31 members of six families just before it was to be heard by the Supreme Court.

The families were among a larger group from Ethiopia, Iraq, Sudan and Syria whose boat was abandoned by people smugglers off the coast of Cyprus in 1998. Until now, Britain has refused to admit the families because it contends the U.N. Refugee Convention doesn't apply to its bases in Cyprus.

The Home Office says the government decided to bring the long fight to an end due to the "highly unusual circumstances."