MIAMI (CBSMiami.com) – United States District Judge Marcia Cooke has blocked the enforcement of a new Florida law that was championed by the National Rifle Association.

Judge Cooke said the law that restricted what physicians can ask their patients violates the Constitution’s free speech protections for both doctors and patients.

READ MORE: Attorney: School Gunman Nikolas Cruz To Plead Guilty To Massacre; Parkland Families React

The law, pushed by the NRA, said physicians couldn’t ask patients if they had guns in their homes as part of a doctor evaluating the health of someone. Supporters said the doctors’ questions were an invasion of privacy.

READ MORE: Nikolas Cruz Pleads Guilty In BSO Jail Guard Attack

State lawmakers did water down the final bill to allow some exceptions, but doctors were scared a patient could file a complaint that could lead to the loss of their medical licenses and fines up to $10,000.

Doctors also claimed that the new rule that took effect June 2 violated longstanding preventative medical practices.

MORE NEWS: Parkland Survivor David Hogg On Potential Guilty Plea: 'It's Horrific That Our Community Has To Continue Going Through This'

(TM and © Copyright 2011 CBS Radio Inc. and its relevant subsidiaries. CBS RADIO and EYE Logo TM and Copyright 2010 CBS Broadcasting Inc. Used under license. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed. The Associated Press contributed to this report.)