A heterosexual couple have lost their Court of Appeal battle to have a civil partnership instead of a marriage.
Rebecca Steinfeld and Charles Keidan, from London, challenged a ruling that said they did not meet the legal requirement of being the same sex.
The judges said there was a potential breach of their human rights, but the government should have more time to decide the future of civil partnership.
The couple said there was still "everything to fight for".
They intend to appeal to the Supreme Court.
A government spokesman said it welcomed the ruling and would take the judgement into account during its evaluation of civil partnerships.
The BBC's legal affairs correspondent Clive Coleman said the couple had lost by the "narrowest of margins".
Our correspondent said: "The government's 'wait and see' policy, which is based on looking at the take-up of same-sex civil partnerships, was found by Lady Justice Arden not to be not good enough to address the discrimination faced by heterosexual couples.
"However, her fellow judges were prepared to let the government have a little more time and so the case was lost on that issue alone."
'Equality and choice'
Kate Stewart and Matthew Cole, 46, decided to get a civil partnership in Gibraltar, a British Overseas Territory, in June 2016, after deciding marriage was not for them.
"Matthew and I didn't feel that marriage reflected our relationship," said Dr Stewart, from Derby.
"The institution [of marriage] is very much unequal depending on your religion.
"We therefore felt it wasn't a status we were comfortable with because it still had hangovers of inequality from the past."
Dr Stewart, 48, said although they believed marriage was right for some couples, it was about having the choice.
They wanted recognition of their relationship after 10 years together, although their civil partnership is still not legally recognised in the UK.
"We paid for the ceremony in pounds, we have a certificate, it was all very British, but as soon as we were back home we didn't have legal recognition," Dr Stewart said.
"The declaration that we were both each other's partner was quite moving... we were on an equal footing. It was surprisingly touching."
Ms Steinfeld, 35, and Mr Keidan, 40, want to secure legal recognition of their seven-year relationship but do not consider marriage suitable for them.
The couple, who have a 20-month-old daughter, have said they want to formalise their relationship within a social institution "which is modern, which is symmetrical and that focuses on equality, which is exactly what a civil partnership is".
"We lost on a technicality," Ms Steinfeld said.
"So there's everything to fight for, and much in the ruling that gives us reason to be positive and keep going."
Dan Squires, QC for the secretary of state for education, who has responsibility for equalities within government, said it had been decided at this stage not to extend civil partnerships to opposite-sex couples, or to either abolish or phase them out.
Instead, he said the government planned to see how extending marriage to same-sex couples impacted on civil partnerships before making a final decision.
All three judges agreed that the status quo could not continue indefinitely.
'Close the loophole'
Human rights campaigner Peter Tatchell, who supported Ms Steinfeld and Mr Keidan in court, said the ruling was "a defeat for love and equality".
"It cannot be right that lesbian and gay couples have two options, civil partnership and civil marriage; whereas opposite-sex partners have only one option, marriage," he said.
Education campaigner and journalist Fiona Millar, who has been in a relationship with journalist Alastair Campbell for 35 years, told the court they had chosen not to get married "on principle".
After the ruling, she said she was "one of thousands and thousands" of people in the UK who will be waiting for the government to "close the civil partnerships loophole by making them available to all".
How do same-sex marriage and civil partnership compare?
- Equal legal treatment in matters including inheritance, tax, pensions and next-of-kin arrangements
- Rules for the dissolution of a civil partnership are the same as those for marriage, except that adultery cannot be used as evidence
- In a civil ceremony there is no requirement to exchange vows and while you can include readings, songs or music, there must be no religious component
- Partnership can be conducted in private, whereas marriage ceremonies must be public and can be conducted by clergy
- Marriage certificates include the names of only the fathers of the parties. Civil partnership certificates include the names of both parents
Conservative MP Tim Loughton, who recently introduced a Private Member's Bill to give mixed-sex couples the right to a civil partnership, said the government had "no excuse" for delaying a change in the law as the bill received cross-party backing.
MPs are due to debate the bill on 24 March.
Lorely Burt, Liberal Democrat spokesperson for equalities, said the verdict was a "slap in the face" to mixed sex couples who want a civil partnership.
Since the start of the campaign by Ms Steinfeld and Mr Keidan, more than 72,000 people have signed an online petition calling for civil partnerships to be open to all.
The Marriage (Same Sex Couples) Act extended the right to marry to gay couples in England and Wales in 2014, allowing same-sex couples to choose between civil partnership and marriage.
In 2013, there were 5,646 civil partnerships in England and Wales, but this fell by 85% in the following two years and in 2015, there were 861 couples who opted for civil partnerships over marriage.
In July 2016, the Isle of Man became the only part of the British Isles where both gay and straight couples can enter civil partnerships.
London couple Claire Beale, 49, and Martin Loat, 55, became the first UK couple to take advantage of the legislation in the British Crown Dependency last year, but their partnership is not legally recognised in the UK.