Detention centre staff were warned not to speak to journalists and other organisations about “anything that happens” on Nauru and Manus Island before a law forbidding disclosures came into effect.

On Wednesday an offence came into force as part of the newly formed Australian Border Force that carries penalties of up to two years’ in jail for detention staff who make unauthorised public disclosures.

More than 40 doctors, nurses, teachers and humanitarian staff who have worked in Australian immigration detention centres wrote an open letter to the federal government in protest.

Guardian Australia can reveal that the Save the Children operations manager on Nauru, Tony Still, warned staff on the island not to speak to journalists – or to external organisations – about “anything that happens” at the detention centre.

On Wednesday the immigration minister, Peter Dutton, appeared to contradict Still’s comments, when he said “the airing of general claims about conditions in immigration facilities will not breach the ABF act”.

An email obtained by Guardian Australia reveals that Still emailed all staff on the island warning them about speaking out from a “sense of anger and desire for retribution”.

It was sent following the announcement of the imminent closure of the school for child asylum seekers at the detention centre. There is no clear child protection framework at local schools outside the centre and concerns have been raised that child asylum seekers may be subject to corporal punishment.

Still wrote in the email: “I know it is an emotional time with realisation of the imminent school closure beginning to hit home.

“Often this can bring a sense of anger and desire for retribution. It would be remiss of me not to remind you of the commonwealth law ... that came into force seven days ago.”

He continued: “Under this act, it is a criminal offence punishable by imprisonment by up to two years for any person working directly or indirectly for the [immigration department] to reveal to the media or any other person or organisation anything that happens in detention centres like Nauru and Manus Island. It is irrelevant what we think of this law. This is ... the law and is enforceable.”

The email was sent in June, well before the new offence became law. It is unclear why Still said it was already in force. He did not outline the exceptions in the act that permit some limited disclosures.

Still wrote that while the parents of one asylum-seeker child at the centre were “devastated” by the closure of the school, they “impressed on me their delight and their pride with their daughter’s progress”.

He continued: “So rather than looking around at the fences, the barbed wire, the conditions and lack of resources that the asylum seeker have in RPC3; look instead at the asylum seekers eyes which light up when they see a red shirt, look also at their smile which brightens considerably when they recognise.”

Australian Lawyers Alliance spokesman Greg Barns said it was a threatening email that showed how the government was planning on using the new offence.

“What this email shows is that despite the minister seeking to pull the wool over the eyes of the Australian community, that the Department of Immigration fully intends to utilise this law to throw a cone of silence over ... Nauru and Manus Island,” he said.

“This is a threatening email and no doubt is a threat that will be repeated, because that’s how broad this new offence is.

“There is no doubt that the scope of this law is such that journalists and anyone who encourages the publication of information [may] be charged with aiding and abetting the principal offender.”

A Save the Children spokesman said: “It is appropriate for senior management to remind staff of their legal obligations while working on Nauru, particularly when new legislation is coming into effect. The protection and welfare of children is at the core of what Save the Children does, and we have meticulous reporting mechanisms in place to raise any incident of concern in the appropriate forum.”

The immigration minister did not respond to requests for comment.

The open letter sent by former detention staff on Wednesday issued a direct challenge to the prime minister, Tony Abbott, to prosecute them for speaking out.

The new law has drawn heavy criticism from peak bodies, including the Australian Medical Association and Australian Education Union.

The World Medical Association also spoke out about the offence and called on Abbott to amend the laws to allow for a public interest defence.