The peak legal body has warned Home Affairs Minister Peter Dutton an attempt to deport alleged foreign criminals before trial would endanger national security and undermine natural justice.

The push by the Home Affairs department to allow unlawful non-citizens facing criminal charges to leave the country without facing court has also angered public prosecutors and attorneys-general.

The peak legal body has voiced its concerns directly to Home Affairs Minister Peter Dutton. Credit:Dan Peled / AAP

Late last month, all eight directors of public prosecutions - in every state and territory - took the rare step of jointly writing to Home Affairs secretary Michael Pezzullo urging him to immediately reconsider his position.

Currently, prosecutors can issue a "stay certificate" to keep non-citizens in Australia while they face criminal charges. If convicted, offenders are usually deported after their sentence.