The plight of legal residents wrongly identified as living in Britain illegally has erupted as the country hosts leaders from the 53-nation Commonwealth of the U.K. and its former colonies.
May met with Caribbean leaders and envoys Tuesday, and told them "we are genuinely sorry for any anxiety that has been caused."
People who came to Britain after World War II are known as the "Windrush generation," after the ship Empire Windrush, which carried hundreds of Caribbean immigrants to Britain in 1948.
Those who arrived before a change in the law in 1971 had an automatic right to settle in the U.K. But some from that generation, especially those who arrived as children on their parents' passports, say they have been denied medical treatment or threatened with deportation because they can't produce papers to prove their status.
"The Windrush generation helped to build the country that we are today," May said. "And I want to dispel any impression that my government is in any sense clamping down on Commonwealth citizens, particularly those from the Caribbean who have built a life here."
On Monday, Home Secretary Amber Rudd said she was setting up a task force to sort out the Caribbean immigrants' paperwork simply and for free, and promised that no one would be deported. The government said it is checking to see whether anyone has been deported from Britain in error.
Reports of long-time residents being detained or denied health care are a deep embarrassment to the British government as it hosts the biennial Commonwealth Heads of Government Meeting in London this week.
Britain wants to use the meeting to bolster frayed ties with its ex-colonies, and to pave the way for new trade deals after the U.K. leaves the European Union next year.
The British government has taken an increasingly tough line on immigration, which has increased dramatically over the last 10 or 15 years largely as result of people moving to the U.K. from other EU countries.
A desire to control immigration was a major factor for many voters who supported Britain's exit from the EU in a 2016 referendum.
As part of its goal of reducing net migration to below 100,000 people a year, the Conservative government has tried to make Britain - in a phrase used by May when she was home secretary - a "hostile environment for illegal immigrants."
One aspect of that policy is recent rule changes requiring people trying to rent property or use health services to show they have the right to live in the U.K.
May said Tuesday that some Windrush immigrants, "through no fault of their own," had fallen foul of that policy.
After the meeting, Jamaican Prime Minister Andrew Holness said he accepted May's apology.
"I believe that the right thing is being done at this time," he said.
"The truth is that (May) has said there has been a policy change, that this was an unintended consequence. As Caribbean leaders we have to accept that in good faith."
Copyright 2018 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.