Australia's detention centre on Manus Island has often drawn criticism since it was re-opened in 2012. This is a timeline of key events.
2001: The camp first opens under Australian Prime Minister John Howard's so-called Pacific Solution, a policy of deterring asylum seekers.
2008: The centre is formally closed in 2008 under Prime Minister Kevin Rudd.
November 2012: It is re-opened by Prime Minister Julia Gillard after a spike in asylum seeker arrivals becomes a major political issue for her Labor government.
July 2013: Mr Rudd, who returned as prime minister, announces that asylum seekers who arrive by boat will never have the option of settling in Australia - a significant toughening of the policy.
August 2013: Australia agrees to give Papua New Guinea A$400m (£230m; $310m) in aid in exchange for housing the camp and agreeing to resettle refugees.
February 2014: Iranian asylum seeker Reza Barati, 23, is murdered inside the detention centre. Mr Barati was struck with wood and a rock when riots broke out and locals entered the facility. Another 70 asylum seekers were injured.
An Australian Senate report later finds that the riots were "eminently foreseeable" because the centre had experienced a rapid influx of detainees, stretching it beyond its intended capacity.
Two PNG men are later found guilty of Mr Barati's murder and sentenced to 10 years in jail, with five years of that term suspended. Detainees claim others had been involved in the murder.
September 2014: Iranian asylum seeker Hamid Khazaei, 24, dies from an infection after cutting his foot, raising questions about whether he received sufficient medical attention.
January 2015: Some detainees barricade themselves inside the compound and go on a hunger strike.
March 2015: Prime Minister Tony Abbott says he is "sick of being lectured" by the UN over Australia's treatment of asylum seekers, reiterating the nation's bipartisan stance that its policy saves lives at sea.
April 2016: PNG's Supreme Court rules that the centre is illegal because personal liberty is guaranteed under the nation's constitution. PNG Prime Minister Peter O'Neill calls for the centre to be closed.
December 2016: Sudanese refugee Faysal Ishal Ahmed, 27, dies after suffering a seizure and a fall. Refugee advocates claimed he had been ill for months.
April 2017: Nine people are injured when PNG defence personnel fire "many" shots into the compound, Australian authorities later confirm.
Prime Minister Malcolm Turnbull's government claims the incident was sparked by anger over claims that a local boy had been led towards the centre by asylum seekers, but this version of events is then disputed by PNG Police Commissioner David Yapu. Mr Yapu says nothing had happened to the boy.
June 2017: The Australian government and its contractors offer compensation totalling A$70m (£41m; $53m) to refugees and asylum seekers who claimed they had suffered harm while in detention on the island.
August 2017: Iranian asylum seeker Hamed Shamshiripour is found dead in a suspected suicide.
September 2017: The US accepts 22 refugees from Manus Island, its first intake under a resettlement deal.
2 October 2017: A Sri Lankan refugee is found dead in another suspected suicide.
October 2017: The UN's refugee agency warns that Australia's withdrawal could create a "humanitarian emergency", while Human Rights Watch urges Canberra to consider sending police to assist with the transition.
31 October 2017: Hundreds of refugees and asylum seekers refuse to leave the centre, citing fears for their safety in the local community, as water and electricity is disconnected.