Hundreds of doctors have rallied in Sydney against a law that makes it a crime for people working in asylum seeker detention centres to speak out about what they see.

Braving a chilly and foggy morning, the medics gathered on the steps of the Sydney Town Hall in protest against the secrecy provisions in the federal government's newly introduced Australian Border Force Act.

Doctors and Health Professionals protesting new laws that threaten them with jail if they reveal conditions in detention centres. Credit:Fiona Morris

Under the Act, anybody working directly or indirectly for the Department of Immigration and Border Protection - including teachers, social workers and doctors - is threatened with two years jail if they disclose what happens inside onshore and off detention facilities.