I married Jack in 1991 and we have five children. When our eldest son was 16, we decided to up sticks and emigrate to Australia, where we had enjoyed lots of holidays.

As part of the process, we had to send off our birth certificates. Wary of posting original copies, I visited the registrar's office with Jack to get duplicates. After a few moments in the waiting room, the registrar called out, "Miss Kim Walmsley?"

"Over here," I said. "But it's Mrs Kim Walmsley." She looked me up and down. There was a pause, then she said, "I'll just be a few minutes."

Five minutes later she returned. "Will you come with me, please?" I stood up and so did Jack. "No, just Miss Walmsley. We need to talk to her alone."

"It's Mrs Walmsley and anything you need to say to me you can say in front of my husband," I said.

The registrar turned and looked at me. "Are you sure?" she said.

I was bewildered, but when she took us into her office and told us the problem, my first response was incredulous laughter. "We can't issue you with an identical birth certificate," she said, "because you're registered as a boy."

It emerged that in 1965, when my original birth certificate had been filled in, the registrar had written "female" on it, but marked me down as a boy in the book of registration – we'll never know why. I said, "Obviously I am a girl. I've had five natural births. Just change it for me."

"I can't do that," she said. "We have a corrections procedure, but the book itself can't ever be changed." The correction would be a marginal entry next to the original one, dated on the day the correction was made. I'd need to provide medical records.

I left the town hall with a new birth certificate with "male" marked on it. It was surreal, but I remained confident that everything could be sorted out. I had used my original "female" birth certificate for the emigration process. We left the reregistration problem in the hands of our solicitor and left the country in good faith, on a temporary visa, uprooting ourselves from Liverpool and starting a new life in Queensland. Our children started at Australian schools and made friends; we set up a new business and were doing well.

Meanwhile, our solicitor received a letter from births, deaths and marriages saying my original birth certificate, because it wasn't a true copy of the original registration, was considered an illegal document.

We hadn't acted illegally when we'd applied for our visa, because we hadn't known of the mistake, but my passport would soon have to be renewed. I'd have to fill in the form asking if anything had changed since my last application. What would happen then? Would I be arrested? Would we be unable to leave? There were no clear answers. In the end, after a lot of heartache and rows, we decided to return to Liverpool.

People didn't know what to make of it when we reappeared – we'd held a big farewell party only a year before. Our kids told friends what had happened and Chinese whispers were soon going round – I was really a man, our children were adopted. One day we left the house to find homophobic graffiti on our gate and garden wall – someone had written "Queers" and "Roy and Hayley". We felt intimidated and under siege, but determined to rectify the ridiculous situation we'd found ourselves in.

Since then we have had a decade of false starts and dashed hopes, of solicitors taking on our case, only to give up months later. My passport expired and, unable to renew it, I effectively became a prisoner in the UK. It was only when someone asked if we were still legally married that we thought to question that. The archbishop of Canterbury wrote to tell us he could no longer recognise our marriage of 23 years.

I mourn the new life we'd planned. Over the years, the solicitor's fees, lost business and cost of moving to the other side of the world and back have cost us £150,000. Births, deaths and marriages did offer to reregister my birth, which would allow me to have a passport with "female" on it again, but I would be registered as female only from when the correction was made: the original – and legal – entry would still say "Boy".

I imagine a descendant 100 years from now researching the family tree, drawing their own conclusions. Perhaps I'm stubborn, but I just want to be represented as I really am … a female.

• As told to Chris Broughton

Do you have an experience to share? Email experience@theguardian.com