The government has been defeated in the first of a series of votes on its plans to reform the health service in England.
Peers voted by 244 to 240 - majority four - in support of a cross-party amendment to emphasise the importance of mental health.
The defeat came during day one of report stage of the Health and Social Care Bill on 8 February 2012.
Opening the discussion, crossbench peer Lord Patel said mental illness was a "leading cause of suffering, economic loss and social problems", and it was time to recognise "that good mental health underlines all health".
The amendment would give mental illness equal status with physical illness in the government's promotion of a comprehensive health service.
Liberal Democrat Lord Alderdice, who co-sponsored the amendment, said the issue was about making "absolutely clear" that concern for those with mental health issues "is every bit as great" as for people suffering from physical illnesses.
Urging ministers to accept the amendment, crossbencher Lord Walton of Detchant asked: "How on earth could this be construed as doing any damage whatsoever to the bill?"
Lib Dem Lord Carlile of Berriew, who voted against the government, claimed there was a "postcode lottery" with mental health treatment, and that rural areas were particularly worse off.
He said the amendment would send a "telling message of support" to those who care for someone with a mental illness.
Labour's Baroness Whitaker said it was "widely damaging" and "destructive" not to have parity between mental and physical health issues, and Conservative peer Lord Newton of Braintree asserted the amendment was a "no brainer".
Opposition health spokeswoman Baroness Thornton fully supported the amendment and urged the government to accept it.
But Health Minister Earl Howe said it was unnecessary because "parity" between mental and physical illness was already set out as one of the overall requirements of the bill.
He offered to strengthen the wording in the explanatory notes of the bill and invited Lord Patel to discuss the matter further with him to see if anything more could be done.
Lord Patel said it was with "a very heavy heart" that he would force a vote on the amendment.
The amendment was backed by 167 Labour peers, 65 crossbenchers and nine others.
Three Liberal Democrat peers rebelled, including Lord Alliance, Lord Carlile of Berriew and Baroness Tonge.
Peers later passed, without a vote, an amendment agreed between the government and the Lords Constitution Committee, specifying that the health secretary retains "ministerial responsibility to Parliament for the provision of the health service in England".
Earlier that day,
Prime Minister David Cameron strongly defended the government's health reforms and dismissed suggestions Health Secretary Andrew Lansley's job could be at risk over the issue.