The families of overseas NHS support staff and care workers who have died with coronavirus can stay in the UK permanently.
The Home Office bereavement scheme had previously only applied to certain professions, such as nurses.
Home Secretary Priti Patel has extended it to cover cleaners, porters and other low-paid roles after pressure from Labour and the unions.
But a free visa extension scheme still does not apply to support staff.
The offer of indefinite leave to remain for bereaved families of support staff will be effective immediately and retrospectively, the Home Office said.
Ms Patel said: “Every death in this crisis is a tragedy, and sadly some NHS support staff and social care workers have made the ultimate sacrifice in the pursuit of saving the lives of others.
“When I announced the introduction of the bereavement scheme in April, I said we would continue to work across government to look at ways to offer further support.
“Today we are extending the scheme to NHS support staff and social care workers.”
The announcement was welcomed as “very good news” by Labour’s Yvette Cooper, who chairs the Commons home affairs committee.
She said her committee had been “pushing on this for weeks”, adding on Twitter that it would be “unthinkable to ask family who lost a loved one on the UK Covid social care frontline to leave their home & UK”.
But she said the government now needed to expand free visa extensions to cover care workers, NHS porters and care workers too.
In March, the Home Office brought in a one-year free visa extension for some staff in the NHS and care sectors.
The list was initially limited to NHS doctors, nurses and paramedics.
For those eligible, the extension covers visas which expire between 31 March and 1 October 2020.
Last month, Priti Patel extended the scheme to more NHS staff, including radiographers and social workers, and said some social care staff would also benefit.
But the list does not include jobs like porters and cleaners.
Prime Minister Boris Johnson has also rejected calls from Labour and the SNP to scrap the fees overseas health workers have to pay to use the NHS.
The health immigration surcharge on non-EU migrants is £400 per year and is set to rise to £624 in October – but the opposition says health workers should be exempt from it.
Speaking at Prime Minister’s Questions, Mr Johnson said he understood the “difficulties” NHS staff faced but the country could not afford to scrap the charges in the current economic climate.
Labour’s shadow home secretary Nick Thomas-Symonds said: “NHS staff like porters and cleaners, and social care staff, should never have been excluded from the bereavement scheme in the first place.
“Now the government also has to change its stance on charging NHS and care staff from overseas to use our NHS. This hypocrisy must end.”
The GMB union said it was “great” that its pressure had “forced the Home Office to back track” on offering the right to remain to all bereaved families of NHS and care workers.
But union organiser Lola McEvoy urged the home secretary to ensure the scheme covered all frontline roles, including part-time workers, in the same way that temporary coronavirus death-in-service benefits launched last month do.
“Not only is it the right thing to do, it’s also an acceptance that regardless who you work for, where you were born or how much you’re paid – if you have fought frontline during this pandemic – you and your family will be supported and treated the same.”