Peers voted 222 to 146 for a wrecking amendment by Baroness Young to the Sexual Offences (Amendment) Bill during its second reading.
However, summing up, the Home Office minister Lord Williams of Mostyn made clear that the Government would now invoke the Parliament Act, which can overrule peers, and reintroduce the measure in the Queen's Speech in the autumn.
The legislation, which comprises safeguards for young people in care, was overwhelmingly backed in the Commons in a free vote earlier this year.
But Baroness Young, a Tory peer, insisted it was in her constitutional right to take the unusual step of moving an amendment during a second reading debate and criticised the provisions criminalising adults in positions of trust who seduced teenagers under 18 as "weak". She said it was "not a human right to commit buggery". The law influenced behaviour and lowering the age of consent would "send out the wrong signal to young people", she said. "This will be a signal that sex at 16 is all right for either girls or boys, whether in a heterosexual or homosexual relationship ... I do not share the view that there is a moral equivalent to those two relationships."
Those who supported her would be "supporting and helping young people, we shall be supporting and helping good and responsible parents, and supporting the institution of marriage, which is under threat, and is causing a great deal of the breakdown of society as we see it today, and above all we shall be reflecting what the public want".
Lord Williams had urged peers to back the measure to ensure "equality before the criminal law" for homosexuals and heterosexuals.
He said: "We believe this is a fundamental principal of equality, the Bill would bring that about and that is why I personally support it ... We are not opening the floodgates of social change for further reductions in the age of consent."
He added: "I don't myself see any moral distinction between a man of 47 or 57 having sexual intercourse with a girl of 16 and the same age of older man having sexual relationships with a boy of 16-plus."
For the Liberal Democrats, Earl Russell, told Lady Young: "I do not believe there are going to be any fewer homosexual acts if you are successful." And he added: "It is extremely difficult to live a responsible, careful sexual life if one has to do it strictly in private and surreptitiously."
The Bishop of Bath and Wells, the Rt Rev James Thompson, said the current law endorsed a judgemental attitude towards homosexuality which made gays less safe and exposed them to greater health risks.