The Royal Navy has become the first section of the British armed forces to join a scheme protecting gay rights.
The Royal Navy joins firms like BT and IBM by signing-up
It has signed equal rights charity Stonewall's Diversity Champions Programme to promote fair treatment of lesbian, gay and bisexual recruits.
Gay and lesbian couples with a registered civil partnership will also be able to apply for married quarters, in all armed forces, from the autumn.
Gay people were legally permitted in the UK forces only in 2000.
The Civil Partnership Act 2004, for which Stonewall campaigned, was passed in November and is expected to take effect later this year.
Royal Navy spokesman Anton Hanney said the force's existing no-sex policy would remain in place on ships and at naval bases for homosexual and heterosexual staff.
He said: "However, from the autumn, as long as gay or lesbian couples have a registered civil partnership, they will be eligible to apply for accommodation in married quarters.
"We will be complying with the law. We are obliged to give equal treatment to gay and lesbian partnerships under these terms... this a cross-service policy across the armed forces."
During the first year of the Navy's involvement with the Stonewall programme, seminars, pamphlets and specific advice will be offered to servicemen.
Stonewall chief executive Ben Summerskill said he was optimistic the Army and the RAF would follow suit.
He said forces staff had become so sophisticated and highly-trained that they could no longer afford to lose them as a result of prejudice.
Mr Summerskill said: "I think the Navy have been very courageous to engage with this so publicly."
The move was described as a "superbly positive" move by Lieutenant Commander Craig Jones, 36, who has been serving with the Navy for 16 years, 11 of which were "in the closet."
Lt Cdr Jones, who lives in Sussex Square, Brighton, with his boyfriend, 29-year-old clinical psychologist Adam Mason, said: "It's really nice to see the Royal Navy demonstrating confidence in being able to be so positive about the issue."
He said that by joining the scheme the Navy was not actively targeting gay recruits, but rather, trying not to miss out on their expertise.
Vice-Admiral Sir James Burnell-Nugent, Second Sea Lord, said: "I am committed to ensuring the Royal Navy has a culture in which all our people are valued for themselves and are thus able to give 100% to their job."
The Navy joins 90 other large organisations, with more than two million employees, in the scheme, including BT and IBM.
Commander Tim Kingsbury, the Royal Navy's diversity and equality policy officer, said he initiated joining Stonewall's programme on the advice of gay servicemen like Lt Cdr Jones.
He said: "Commanding officers have a key role to play in creating a culture in which gay and lesbian personnel feel confident that they work without being harassed or bullied because of their orientation."