A Government minister has apologised to the LGB community for any suffering caused by the military's former "unacceptable" ban.
Johnny Mercer was speaking at an event at the House of Commons that marked 20 years since the ban's end.
Addressing a group of veterans, the former Army officer said: "To volunteer for the chaotic and challenging nature of service life and yet, within that community which so many of us are so proud of, to experience discrimination of this sort is unacceptable.
"It was unacceptable then and it is unacceptable now.
"As Minister for Defence People and Veterans, I wanted to personally apologise to you for those experiences."
Prior to the ban being lifted in 2000, anyone found to be homosexual in the UK Armed Forces was honourably discharged.
It was overturned in a ruling by the European Court of Human Rights, following a long-campaign process.
Among those at the event was Royal Navy veteran and long-time gay rights campaigner, Lieutenant Commander Craig Jones.
He said: "In the mid-90s, I was the deputy commander of the aircraft carrier HMS Invincible - that's a fairly complicated and taxing job.
"Doing that job, whilst all the time looking over my shoulder and wondering if there was going to be a day when the Royal Military Police knocked on my door, was a bit of a distraction. But it's what we did at the time."
Commander Peter Gracey, Commander at Maritime Reserves Headquarters, also remembers life before the ban.
"People would be sitting in a particular public house in Portsmouth," he said.
"Thankfully, the staff were on their side and they'd get the nod that the service police had arrived and they'd be ushered out of the back door.
"It was quite difficult - people had to hide who they were."
Nowadays, things are very different, with military personnel marching at Pride events and each service ranked in the country's top 100 LGBTQ+ employers.
But Mr Mercer told Forces News more still has to be done to tackle discrimination: "I'm always acutely aware that we will have individual cases where we will have things not where I would like them to be."
On Sunday, to mark the exact day the ban was lifted, a rainbow flag will be flown above the Ministry of Defence.