Discriminatory laws which forced gay men, lesbians and transgender personnel out of the armed forces will be torn up.
Existing rules state that engaging in a homosexual act can constitute grounds for discharging a member of the armed forces.
And while the policy was abandoned in 2000, it still technically exists in law.
But MPs have agreed to change that as the Armed Forces Bill cleared its final House of Commons hurdle.
The Army LGBT Forum agreed with the view and told Forces TV:
"This law had no practical impact on the daily lives of LGBT personnel, however it is good to see the act being tidied up."
A government amendment to get rid of the relevant discriminatory laws was added to the Bill unopposed.
The Royal Navy, British Army and the RAF were all recognised as top employers for the LGBT community
Defence Minister Mark Lancaster said the existing rules are "inconsistent with the department's current policies and the Government's equality and discrimination policies more generally".
Mr Lancaster said when the provisions were originally put in place it was government policy that homosexuality was "incompatible with service in the armed forces" and therefore people who "engaged in homosexual activity were administratively discharged".
But since 2000 "these provisions have had no practical effect and they are therefore redundant".
"These provisions in no way reflect the position of today's armed forces," he said.
"We are proud in defence of the progress we have made since 2000 to remove policies that discriminated against homosexual men, lesbians and transgender personnel so that they can serve openly in the armed forces."
Stonewall, a charity that champions rights for the LGBT community has listed the British Army among its top 50 employers in 2015.
Royal Air Force personnel on parade during the 2014 London Pride event.
Many McBain MBE, Account Manager, Stonewall said: ‘Stonewall has worked with all of the armed forces over the last few years, and each has demonstrated a commitment to lesbian, gay, bi and trans (LGBT) equality."
"As well as ensuring policies and practices are inclusive, we’ve seen numerous role models and allies pave the way for inclusion across the organisations."
He added: "We look forward to continuing our work with them to ensure that all LGBT people who work in, or with the Armed Services, are accepted without exception’
The Armed Forces Bill legislates for the UK to keep its Army during peace time.
The latest version contains provisions relating to armed forces pensions and to the powers of Ministry of Defence fire fighters.
The bill will now proceed to the House of Lords for further scrutiny.