The UK Government was defeated in the House of Lords on the issue of unaccompanied refugee children in Europe being given refuge in the United Kingdom.
MPs defeated a Labour proposed amendment to the Immigration Bill to allow unaccompanied child refugees to come to the UK from Europe by 294 votes to 276, in a narrow victory for the government in the Commons.
However, when it went to the Lords the bill was rejected and returned to the Commons for further consideration.
The Lords voted 279 to 172 to reject the bill.
The government had wanted to cap the number of children at 3,000 until 2020. Labour peer Lord Dubs proposed an amendment to do away with any restriction on the number.
SNP Westminster leader Angus Robertson criticised the Prime Minister for failing to see the comparison between the children at risk in Europe and the Kindertransport scheme, which helped rescue nearly 10,000 mainly Jewish children from Nazi-occupied territories in 1938/39.
Labour peer Lord Dubs was one of 669 children who escaped the Holocaust on trains from Prague organised by British stockbroker Sir Nicholas Winton.
He welcomed government support for refugees, but added: "When all is said and done, the government will still leave thousands of children in Europe.
"Children who are vulnerable, children who are in an unhappy situation, children who are in danger possibly even to their lives and certainly to their wellbeing."
Those opposed to the amendment said they were concerned it would only encourage more refugees to come to Europe.
David Cameron has insisted the UK is not "walking on by" by refusing to take in unaccompanied refugee children from Europe.
Amnesty International described the decision as "a shameful response to the biggest immigration crisis of our time" and called for Northern Ireland MPs to "stand up and be counted" for any revised amendment that may come before the Commons.
How Northern Ireland MPs voted
Of the 18 Northern Ireland MPs in the Commons, six voted.
The DUP's Gregory Campbell and Jim Shannon voted both 'aye and no' - effectively abstaining.
Both the UUP's MPs Danny Kinahan and Tom Elliott voted with the government defeating the amendment.
While North Down independent Lady Sylvia Hermon and the SDLP's Mark Durkan voted in favour of allowing the 3,000 children
Nigel Dodds, Ian Paisley, Jeffrey Donaldson, Gavin Robinson, David Simpson and Sammy Wilson of the DUP did not take part in the vote.
Alastair McDonnell and Margaret Ritchie of the SDLP also didn't take part.
Sinn Fein's four MPS - Francie Molloy, Mickey Brady, Pat Doherty and Paul Maskey do not take their seats and so do not participate in proceedings.
DUP East Belfast MP Gavin Robinson said they abstained because he didn't believe the amendment "quite right" or satisfied with the resources laid out for the children.
And he said he was working with the government to ensure there was a solution.
"There will be a solution, but it will be a solution that best fits the needs of the children," he told the BBC Stephen Nolan show.
The UK government suffered further defeats on the Immigration Bill over the detention of pregnant women in immigration custody and holding people in detention for more than 28 days.
It will now decide whether to try to overturn the latest defeats when the bill returns to the Commons.