A woman who was threatened with imminent deportation from the UK despite having a seriously ill British husband in London has been released from detention after The Independent highlighted the case.

Ngam Ngon Leonardi, 52, was detained in Yarl’s Wood two weeks ago and told she would be removed to her native Thailand, leaving her husband Mark, who is in the final stages of kidney failure and has epilepsy, with no one to care for him.

Ms Leonardi was set to be deported at 4pm on Tuesday, but less than two hours before the flight – and shortly after The Independent approached the Home Office for comment on the case – her removal was deferred.

At around 6pm that day she was released from Yarl’s Wood and given money for a taxi to return to her home in north London. She still has to report monthly to the Home Office though, and hasn’t yet been granted leave to remain in the UK.

The Thai national said she was relieved to be at home, but described feeling terrified and constantly worried that Mr Leonardi wouldn’t be able to cope on his own while she was in detention.

“I felt so upset in Yarl’s Wood. There were many people, people banging on doors. I was really scared,” she said. “I was so worried about my husband. He can’t do a lot of things on his own. He can’t lift things. I knew he wouldn’t be safe on his own.

“I felt like they were trying to get me out of the country as quickly as possible. They said that if I don’t get removed this time, next time I would be handcuffed.”

The couple, who met 15 years ago and got married in 2015, have moved between north London and Thailand throughout their married life. They came to the UK last May, with a plan to go back to Thailand after Ms Leonardi’s six-month tourist visa expired.

But during this time, Mr Leonardi became seriously ill due to kidney failure, meaning he had to go on dialysis. The couple subsequently decided that – due to both difficulty for him to travel and the lack of treatment available in Thailand – Ms Leonardi would apply for longer-term immigration status in the UK.

Her application was rejected three months later. While the Home Office accepted the couple had a “genuine and subsisting” relationship, it said the treatment for Mr Leonardi’s medical condition was available in Thailand, adding: “Even if this was not the case, it is open to [Mr Leonardi] to remain in the UK to receive the medical treatment he needs, while [Ms Leonardi] returns to Thailand to obtain the correct entry clearance.”

The department also argued that, if he did not have friends or family to care for him in the UK, Mr Leonardi could “access the NHS and any care or support requirements he may have through his local authority”.

Mr Leonardi said he was happy to have his wife back at home, but that they were still fearful that she could be detained again. “I feel a lot better now that she’s back,” he told The Independent. “I can sleep at night now, and I know someone is there in case I have a fit. It’s great for her to be back home.

“But we are still worried because she still has to report. We paid all the fees for the visa and everything but they say we’re not allowed to apply from this country. What am I supposed to do while she’s not here? I just think this country is barbaric.”

Mary Atkinson, families together campaign officer at the Joint Council for the Welfare of Immigrants, said: “We are so glad that Ngam Ngon is back home where she belongs – but she should never have been put through this ordeal.

Why is the Home Office getting so many immigration decisions wrong?

“The Home Office waited until the very last minute, when she had already been dragged to the airport, to see sense. This is happening every day – anyone who doesn’t happen to have a good lawyer and thousands of supporters is entirely at the mercy of the same poor decision-making that very nearly saw Ngam ​Ngon sent thousands of miles away from her gravely ill partner of 15 years.”