Labor's Caucus has agreed to legislation that will overturn the High Court ruling that the Malaysian deal on asylum seekers is unlawful.

If passed, the bill would allow Australia to send 800 asylum seekers to Malaysia and use Papua New Guinea's Manus Island as a backup centre.

During a two-and-a-half-hour spirited debate, a motion by Left faction senator Doug Cameron to allow onshore processing was defeated, although several members from both Left and Right factions spoke in support.

However, the Opposition has vowed to oppose the so-called Malaysian solution and may join the Greens to defeat the new bill in Parliament.

The amendments to the Migration Act, described by Prime Minister Julia Gillard as "broad in nature", will be introduced to Parliament next week.

"They will enable the government of the day to design and implement its best solution," Ms Gillard told a press conference at Parliament House.

"The best solution from our point of view is the arrangement with Malaysia with a complementary centre in PNG."

She said the amendments would give executive government the ability "to make the arrangements that it sees fit for the transfer and processing of asylum seekers in third countries".

Sorry, this audio has expired Labor aims for new Malaysia deal ( Sabra Lane )

Ms Gillard warned Opposition Leader Tony Abbott against opposing the amendments, saying he too will need the legislation if he forms a government in the future.

She said the "crystal clear advice" to government was that sending asylum seekers to Nauru does not work because if they are genuine refugees, they are very likely to be resettled in Australia.

"People smugglers have got that message and they now understand that a processing centre on Nauru is really just like another Christmas Island. If your claim is accepted, then you will be settled in Australia," she said.

Immigration Minister Chris Bowen said onshore processing would blow the budget estimates out to $4 billion, "billions more than in the budget".

Ms Gillard said the deal with Malaysia meant people would not have their claims processed in Australia but would be sent to the back of the asylum seeker queue.

In Caucus, 23 people spoke both for and against the amendment, in what was described as a robust debate.

ABC News Online understands it was not divided on ideological lines, with some from the Left supporting the Prime Minister's amendment, while some on the Right preferring to bring all asylum seeker processing onshore.

In the end, Ms Gillard's amendment was carried on the voices.

Mr Abbott says the Coalition is prepared to consider any plans by the Government to change the Migration Act, but questioned the new policy.

"Given that Nauru has signed the refugee convention and Malaysia has not why is the Prime Minister persisting with a policy that has been rejected by the High Court and many in her own party and offends every principle that she has ever espoused?" he said during Question Time.

With the Greens implacably opposed, the Government will need the support of the Coalition to pass its legislation.

Greens leader Bob Brown said the amendments would lead Australia "to the harsh side of treatment of asylum seekers of John Howard and Philip Ruddock".

"We want onshore processing because it's just, it's legal, it's humane, and subsidiary to that it saves taxpayers billions of dollars," Senator Brown said.

He pointed to an opinion poll published today that showed most Australians support onshore processing.