Two Durham University academics and their daughter who were ordered to leave the UK within 14 days have been told they can stay in the UK.
The Home Office said the couple breached rules by spending too much time abroad during their visa period.
But it halted proceedings following the intervention of their local MP.
The family were given a temporary reprieve before the government confirmed they could stay.
A Home Office spokesperson said: "Following a review of the initial decision, Dr Schwartz-Marin has been informed that his application and that of his wife Dr Arely Cruz-Santiago for indefinite leave to remain has been approved."
Dr Ernesto Schwartz-Marin's application had been refused because he was absent for more than 180 days within a 12-month period, the Home Office said.
The couple, who have lived in the UK for 11 years, did humanitarian work in their home country of Mexico for the university.
Although there are exceptions for humanitarian projects, the Home Office stated their work did not qualify.
Dr Schwartz-Marin said: "We need to lobby for a change in the law with regards to academics working abroad as part of their job."
Labour's City of Durham MP, Roberta Blackman-Woods, said: "They came here in 2007 when their daughter was only a few months old. Her whole life has been in the UK.
"It seems really unfair to penalise them for doing their jobs, which they were in the UK for."
More than 70,000 people signed a petition calling for the Home Office to reconsider its decision.