Australia's Senate has rejected a bill calling for the revival of offshore processing of asylum seekers.
The lower house had on Wednesday narrowly passed the bill to restore the government's power to send asylum seekers to third countries and let it proceed with its Malaysian people-swap deal.
After heated and emotional debate, the Senate rejected independent MP Rob Oakeshott's bill by 39 votes to 29.
The Greens and Coalition argued it did not do enough to protect the human rights of asylum seekers in third countries.
Shortly after the bill was voted down, Prime Minister Julia Gillard announced former Defence chief Angus Houston would lead an expert group to devise the best way forward for dealing with the asylum seeker issue.
The Government has indicated it could be willing to dump plans to send asylum seekers to Malaysia, depending on the panel's recommendations, the ABC says.
The policy debate had been prompted by the deaths of more asylum seekers on their way to Christmas Island.