A move to require councils in England to identify whether they have spare capacity to house unaccompanied child refugees has been rejected by MPs.
Conservative Heidi Allen said ministers had not consulted properly with local authorities when opting to close the Dubs resettlement scheme this month.
But MPs voted against her amendment by 287 votes to 267.
The Home Office said it encouraged councils to come forward if they had capacity for child asylum seekers.
Only three Tory MPs voted in favour of the amendment: Ms Allen, Tania Mathias and Nicky Morgan. They were joined by 195 Labour MPs, 47 SNP, and nine Liberal Democrats, among others.
A total of 282 Tory MPs voted against.
Campaigners want 3,000 Syrian and other children in Europe to be found homes.
They said ministers have failed to live up to their commitment to do all they can to help the victims of the civil war in Syria and other conflicts when agreeing to take an unspecified number of children under a scheme named after Labour peer Lord Dubs.
When the scheme closes later this month, the government expects 350 children to have been given sanctuary in the UK - in addition to those already accepted under other resettlement and asylum programmes.
'Heartless and heartbreaking'
Ministers have said councils, which are under extreme financial constraints, do not have the capacity to take the number mooted by campaigners.
They have also long expressed concerns that taking children directly from southern Europe and the Balkans encourages child trafficking and potentially fatal journeys across the Mediterranean - a claim contested by charities.
A cross-party group of MPs had hoped to amend the Children and Social Work Bill currently before Parliament to place a statutory duty on councils to consult and report back to ministers at least once a year on their capacity to provide safeguarding and welfare services to children, including refugees from abroad.
Yvette Cooper, the Labour chairwoman of the Home Affairs Select Committee, said she was "deeply disappointed" by the vote's result.
Liberal Democrat leader Tim Farron said: "To not help vulnerable children in need is utterly heartless and heartbreaking.
"This vote shames Britain. The government continues to defend the indefensible by closing Dubs against opposition from a significant number of MPs, including those on its own benches, and from the public."
Lord Dubs, who arrived in Britain as a refugee from Nazism, said he was "disappointed", but insisted: "The campaign isn't over, our better nature will surely carry the day."
Citizens UK has claimed there are at least 368 spaces available for children in the UK under the terms of the national transfer scheme for asylum-seekers.
The charity said it was "devastated" by the vote, but added that their campaign "doesn't end here".
Children's charity Unicef said it was "hugely disappointing that the government did not listen to the many MPs who wanted the UK to do more", while Oxfam accused ministers of "closing the door on child refugees who have fled terrible violence".
Earlier, Ms Allen, who tabled the amendment, said the UK had done an "amazing job" in terms of welcoming 20,000 refugees directly from Syria and its neighbouring countries and providing more than £2bn in aid to help those displaced by the six-year conflict.
But she said helping unaccompanied children already in Europe was a "final piece in the jigsaw" where the UK was currently falling short.
"This is a global crisis and we need to play our part," she told the BBC.
"The Dubs amendment moved us as a nation. We could not not respond to that terrible image of a little boy washed up on the beach.
"We have decided to end the Dubs scheme neatly at the end of the financial year. Humanitarian crises won't end at the end of the financial year nor should our compassion."
Seventeen-year-old Amir lived with his family in the Syrian city of Aleppo, for years the scene of some of the country's worst fighting. His parents were so frightened that their only son would end up as a fighter, either for government forces or for the Free Syrian army, that they took the decision to get him out of the country.
He told the BBC: "It was like a horror film, bombs every day, everybody scared, the only choice is to wait for death or leave."
In 2015, his parents paid people smugglers to transport Amir to Turkey. He was 15. He describes how from there he travelled through seven other European countries alone, sometimes negotiating with traffickers.
Helped by the charity Safe Passage, he was transferred to the UK from France last autumn. He is one of 200 unaccompanied under 18s who have been re-settled here under the Dubs scheme.
"It's so sad the government is closing the scheme. There are lots of children having bad times with no one to care for them. We will be grateful if the British government can help others to survive," he said.
Ms Allen, the MP for South Cambridgeshire, said she had been assured by bodies representing councils that many still had the scope to accept children and that an annual audit, with a duty on ministers to report back to Parliament, would help them to do so.
"Some councils are absolutely bursting, they cannot take any more.
"They have done an amazing job. But there are those still stepping forward and we have not taken them up on their offers."
The MP's amendment - tabled at Report Stage of the legislation - had won the backing of Labour and the Lib Dems as well as prominent former Conservative ministers including Nicky Morgan, Tim Loughton and Anna Soubry.
Faith leaders and prominent actors, including Juliet Stevenson, Rhys Ifans and Toby Jones, led a demonstration outside the Commons during Tuesday's debate designed to increase pressure on the government.
A government spokesman said: "We set up the national transfer scheme to ensure that caring responsibilities for unaccompanied asylum-seeking children are shared by local authorities across the country in a way that is fair and in the best interest of the children.
"We continue to encourage local authorities to participate in this scheme.
"Each year around 3,000 children arrive in the UK and claim asylum, which is in addition to children placed in a local authority area through our resettlement schemes from the Middle East and North Africa region.
"Last year, the UK granted protection or another form of leave to more than 8,000 children."