Update: See below

The first in an occasional series of Immigrant Stories, shining a light on the people trapped in Britain's immigration system.

She had the letter to prove it.

When the Home Office told Mariam Harley Miller, a London psychotherapist, that she had just 28 days to leave the country it felt like a bad dream. But it wasn't. The clock was ticking on the Australian citizen and it would not stop, no matter how strenuously she pointed out they had made a mistake.

She had in her possession a letter, sent by the Home Office, in which they assured her that her visa status was valid. It didn't matter. They wouldn't listen. She was trapped in a system which made no sense, with a timer ticking down to her departure date.

Miller came to Britain in 2005, eleven years after marrying an Italian man and settling down on the continent. She was the archetypal hard-working, pull-your-sleeves-up immigrant: applying for work from overseas, taking the first four days in the UK to sort out her house and a car, and then starting her job the following Monday. Within six months she'd bought a house, using money she brought from selling her place in Italy. She was the type of person a country might welcome: smart, sassy, medically trained and ready to put in the hours.

A couple of years later her husband decided he didn't want to live in Britain anymore and moved back to Italy. The pressure of time apart took its toll and the marriage fell apart. Miller rang the UK Border Agency (UKBA) to check if her immigration status was affected.

They asked how long she'd been married and how long she'd been in the UK. They were operating by the 'three plus one' rule – you were allowed to stay if you'd been married for more than three years and in country for more than one. Having been married for 14 years and in the UK for four, she ably satisfied it.

They reassured her she was able to stay and she asked for a letter to that effect, which was sent to her. Job done – or so she thought.

The next time she needed to contact UKBA was five years later, when she went online to fill in a form for leave to remain.

She was told the rules had changed and that she'd need to apply under the discretionary category. Still she had no idea what she was in for. She sent off the necessary documentation, including that letter from the Home Office and her passport. She would not hear back from them for 18 months.

"We waited a year and half," she says.

"I couldn't travel anywhere, couldn't change jobs, couldn't do anything at all except go to work.

"At the time I was planning on doing another masters – a third one. I couldn't do it because I didn't have my passport. My career ground to a halt at that point.

"My mum now is 80 so she can't travel anymore. I haven't been able to see her. At that point I thought that was bad enough. But then I got the response."

They had refused her application on criteria which didn't even apply to her. The Home Office categorised her as an Australian citizen, whereas her immigration status was based on being the spouse of an EEA national. They said she had failed to get leave of entry – a requirement which was irrelevant to her immigration status.

The solicitors wrote back again highlighting the mistakes in the Home Office's response.

In October 2013, the Home Office sent its reply. There would be no change in the original decision. Miller had no right of appeal. She was given 28 days to leave the country.

The first thing she did was tell her boss at the Child and Adolescent Service clinic where she worked what was happening. And that's when things got even worse.

"I was told I had to be escorted on and off the premises," she says. "And then I was forced to go a panel hearing. The director of services was there, with the head of HR and senior managers. They called the immigration status 'evidence against me'.  This was how they managed someone who dedicated nine years to the NHS. I wasn't an illegal immigrant. I hadn't lied to them. I was still perfectly legal. But my renewal application was refused, so I was treated like this.

"From that point on I was instantly dismissed. No severance pay. Nothing. Nothing at all. The whole thing upset me. But it was how I was treated at work that crushed me."

Tired of explaining the situation to one friend after another and running out of things to distract her as she sat at home, Miller took to her laptop and wrote a Facebook post.

"I was saying: 'This is what's happened to me. And the reason I'm telling you this is because when you read in the newspaper how the government is reducing immigration – well, this is what that actually means. This is the reality of it.'"

Some friends copied and pasted the message onto their Facebook walls. In a couple of days it had gone viral. One friend got 40,000 shares on his post alone. Miller started getting bombarded with emails, friend requests and even phone calls.

"I was getting 400 emails a day. People found me on LinkedIn, Twitter, absolutely everywhere," she says. "It was amazing. I had to get someone to take my phone number down off my website because I was getting so many calls."

Strangers started offering her money to help her through a period without income – although she refused it. Her local MP, Labour shadow business secretary Chuka Umunna, got over his original reticence and became involved, writing letters to Theresa May about the case.

And suddenly, out of the blue, she got a call from the Home Office. Taken aback by the online response, she was offered a review of the case. That was on November 28th, at which point they said it would take three weeks. When I spoke to Miller on Monday, she was still waiting.

In the mean time, they have agreed to halt proceedings against her. But they neglected to inform anyone.

On Christmas day, Capita Business Services wrote to Miller on behalf of Home Office saying she needed to present a ticket out the UK by January 2nd or she was in trouble. In this context, trouble means you can be taken to a detention facility.

She informed the Home Office of the confusion, but last Monday Miller got another letter from Capita saying they hadn't received her ticket and that they were starting proceedings against her. The Home Office assured her they would get Capita to stop, but Miller is not exactly bursting with confidence. There has been a breakdown in communication between the two departments and there's no telling if the Home Office orders will get through.

"The feeling you get is of being a pariah," she says.

"The word immigrant…" She pauses. There's a short silence. "How it's being used now… Like it's something dirty.

"There's this feeling that somehow you have to keep proving yourself all the time. That you've got to be worthy. It's just so hard. It's so hard."

Miller is still waiting to find out what will happen to her. This is her immigrant story.

Update: On January 27th, 2014, Miller was rejected again by UKBA and given removal orders.

Update 03/02/2015: Miller has now been granted a visa to stay in the UK. Following an appeal at Hatton Cross immigration tribunal, it was ruled that her contributions to the UK and the NHS "amount to compelling and exceptional circumstances warranting consideration outside of the rules". Judge Raymond added it "would be disproportionate and not justified by any legitimate public interest in the maintenance of immigration controls" if Miller were removed from the country. The Independent has the full story.