The World Medical Association has condemned new secrecy laws in Australian detention centres, and called on the prime minister, Tony Abbott, to amend the new laws to allow medical staff to speak out about the healthcare of asylum seekers.

On Wednesday, 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 an unprecedented show of unity against a new offence.

The offence came into force on Wednesday as part of the newly formed Australian Border Force, and could see detention staff who make public disclosures or whistle blow about detention centres face up to two years in jail.

Regulations relating to the offence contain limited exemptions for disclosures to oversight bodies and child protection authorities.

In the open letter, the medical workers challenged Abbott and immigration minister Peter Dutton to prosecute them, and said they would not remain silent in the face on ongoing human rights abuses in detention centres.

World Medical Association president Dr Xavier Deau and chair Dr Ardis Hoven have now written to Abbott, saying the new act silences physicians who raise concerns about health conditions for asylum seekers.

The letter says: “This we must assume extends to doctors working in refugee centres who report on their observations arising from their work.

“This is in striking conflict with basic principles of medical ethics. Physicians have to raise their voice, if necessary publicly, when health conditions of their patients, be those free or in detention, are unacceptable. From the incoming reports we must assume that this is the case in the detention centres under the responsibility of the Australian government. We applaud and support those colleagues who advocate for their patients and speak out.”

On Thursday, the Australian Medical Association national conference called on the government to amend the legislation to provide a clear public interest exemption for disclosures.

Deau added: “This is effectively an attempt by the Australian government to gag physicians by making their advocacy for the healthcare of asylum seekers in Australian detention camps a criminal offence. Such a procedure is not acceptable”.

At the launch of the Australian Border Force on Wednesday, commissioner Roman Quadvlieg played down the impact of the laws, and suggested it was about leaking of classified information and not about people “having a right to be outspoken in the community about a range of things.”

But the regulations relating to the disclosure offence tabled by Dutton indicate a broad potential application of the offence.

Two classes of information would expressly relate to asylum seekers held in immigration detention. The first relates to “documents and information about the identity, immigration history or status, or citizenship history or status of a person”. The second makes it an offence to disclose “documents and information about the provision of services to persons who are not Australian citizens”.