Hundreds of Spanish health care professionals are protesting a new law that will require them to deny treatment to illegal immigrants.

The law, expected to be passed Friday by royal decree, prohibits treatment at public hospitals and medical centers of anyone unable to provide proof of residency unless they are under the age of 18, pregnant or require emergency care.

As of Monday, roughly 850 doctors registered as conscientious objectors to the law, which will go into effect Sept. 1.

The decree comes amid a series of austerity measures implemented by Spanish Prime Minister Mariano Rajoy's conservative government as it attempts to drastically cut public spending in an effort to meet budget deficit reduction targets imposed by the European Commission as part of a €100 billion ($122 billion) bailout package from the European Central Bank.

The Spanish National Health System provided universal access to health care throughout the most of the country, except for certain autonomous regions which are responsible for financing their own health care systems.

Many medical professionals in these regions have said they will ignore the decree and continue to provide services regardless of residency status.

Several hundred organizations across Spain, including health care workers unions and immigrant rights groups, have come out against the law.

The Medical College Association said the new law "violates the ethical principles of medicine and the code of professional ethics," according to the Telegraph.