Australia was warned that a 2013 deal to send asylum seekers for processing in Papua New Guinea would be found unconstitutional and leave the federal government's offshore detention regime significantly weakened, letters obtained by Fairfax Media show.

Sir Robert Woods, a former judge of the PNG National and Supreme Courts, wrote to then prime minister Kevin Rudd and opposition leader Tony Abbott in July 2013 warning Australia would be embarrassed by a ruling that sending asylum seekers to PNG amounted to an illegal deprivation of liberty because they were not guilty of any criminal offence.

A former acting NSW District Court judge, Sir Robert helped draft the country's constitution before independence in 1975.

PNG's Supreme Court ruled in April detention on Manus was illegal and unconstitutional, with a subsequent court process on resettlement and compensation leaving about 750 detainees in limbo.