Two vast tent cities are to be set up on Pacific islands to house the hundreds of asylum seekers expected to make their way to Australia in coming weeks.

The decision to call in the troops to set up the canvas homes on Manus island, off Papua New Guinea, and on Nauru island in the Pacific came as the Australian parliament agreed to stop boat people reaching the nation's shores on ill-equipped boats.

Parliament approved laws to bring into play off-shore processing of asylum seekers - and the legislation is expected to be passed by the Senate on Thursday.

Once broken doors and fences have been repaired and air conditioning units installed, would-be migrants would be checked out in the what are currently run-down concrete structures before they could be considered to be suitable to live in Australia.

Despite the unattractive prospect of living in tents for what will be weeks, asylum seekers waiting to board boats in Indonesia told local reporters that they would still be prepared to risk their lives at sea for the chance of an eventual better life.

It is expected that preparing the facilities to hold up to 2,100 asylum seekers will cost at least £350 million ($F980m).

Before the tent cities plan was approved, the government had even considered loading asylum seekers onto hired ships - floating islands - until the detention centres could be repaired.

The troops are expected to start the task of assessing the state of the detention centres on Manus island - which was abandoned in 2004 - and on Nauru, which was closed in 2008, by the end of this week.

Labour Prime Minister Julia Gillard said she had been advised that the troops would be able to set off for the islands almost immediately.

She said Defence Force chief General David Hurley had told her that "within a month we would hope to see people being processed in Nauru and in PNG (Papua New Guinea)."

She added that the temporary facilities would involve tents and "other sorts of temporary structures".

But immigration experts have told of their concerns about housing would-be migrants in tents, when there were problems such as riots in permanent detention centres on Australian territory.

On Nauru, local people have raided the abandoned detention centres and taken away air conditioners and other furnishings and in one case an entire hut has been broken down and carted off.

After parliament passed the bill to allow offshore processing, Immigration Minister Chris Bowen said this was not the end of efforts to deal with people smuggling.

"This is not the end of the efforts to deal with what is the very, very, very, very pernicious trade of people smuggling, which trades on people's lives and gives people the expectation that in return for very significant sums of money they can be brought to Australia for passage." Fiji Times