I joined the Royal Navy in June 1976, a scorcher of a summer. I was 26 years old. A Liverpool boy, I’d had an unsettled early life and it was only when I found myself living in a house-share with some navy lads that I found my calling. Seeing the lives they led and the pay they were getting made my life as a gas fitter seem dull by comparison.

So I joined up, trained hard, and quickly worked my way up to the rank of lead radio operator. Over nearly 18 years I served my country during the Falklands war, in Northern Ireland, Syria, Hong Kong, Egypt and beyond. I had an impeccable service record and numerous medals and badges to show for it, both for conflict and good conduct. I was a trusted and respected naval operator, had wonderful colleagues and friends, and felt blessed to be leading a life I loved.

Immediately after the trial, before I left court, my medal was physically cut from my uniform

But a large part of me was always hidden from view. From the moment in basic training when an officer said that two things were banned in the navy above all – “drugs and gays” – I knew that, as a bisexual man, the part of me that was attracted to other men had to stay out of sight. And I went to great lengths to make sure it did.

As much as I could, I suppressed my feelings of attraction, and avoided interaction with any colleagues I thought might be gay or bisexual. If there was even the slightest sense that someone was lesbian, gay or bisexual and the Special Investigations Branch (the military police) would come for you. They ground people into the dirt. And eventually they came for me.

I’m still not sure how they were put on to me – a speculating informant maybe, or a rare visit to a gay bar where they had someone watching – but it became clear I was a person of interest to them. Time and again, I was brought before the SIB and other senior officers and interrogated. In one meeting I was told by a senior officer that there was no room for “my sort” in the navy and that if he had his way, “disgusting people” like me would be chucked out. It was heartbreaking.

Joe Ousalice during his 18 years’ service with the Royal Navy. Photograph: Liberty/PA

One weekend, while on leave, I was arrested and charged with “indecency” by the civilian police. The police notified my bosses and when they found out, the SIB stepped up their ultimately successful attempts to have me discharged. They falsely accused me of making unwanted advances towards a man. Though I was acquitted at my court martial, I was nevertheless convicted of a second service offence of “conduct prejudicial to good order and naval discipline”. Why? Because during the trial I had been forced to “admit” my sexuality, and they maintained that I been caught in bed with a man.

That alone was enough to for me to be stripped of good conduct badges, and worst of all, my medal for good conduct and long service. Immediately after the trial, before I left court, my medal was physically cut from my uniform. I was told that I would “corrupt” others. I was discharged, devastated, from the navy. I never saw any of my friends again.

Cut adrift from the service to which I had given almost all my adult life, and with little money to live on, I struggled for a long time to rebuild my life. At one point I was forced to steal food from a local farmer’s field. It took me 10 years to clear my debts. Eventually I found employment, although it was never as exciting or challenging as my naval career.

I am now a pensioner and my health is failing. More than anything I want to clear my name. That’s why I’m working with Liberty to get my medal back – I want the navy to apologise for the way they treated me and to acknowledge the years of hard work and good service I gave my country.

But this isn’t just about me. It’s still amazes me how homophobic the forces were back then, and it amazes me even more that we’re only talking about the 1990s. The terrible discrimination we suffered has had lifelong consequences for so many of us. The MoD said sorry, and some of us got a level of compensation – although we could never be compensated for the loss of our career and the terrible humiliations we suffered. Yes, the rules and culture have changed now – but there were hundreds like me who hid their sexuality and were hounded out of the jobs they loved. Maybe some of them lost their medals too. If so, I hope my case reminds them how valuable they were.

• Joe Ousalice is a Royal Navy veteran