RICHMOND, Va. (AP) — A federal appeals court has invalidated two ordinances requiring Maryland anti-abortion pregnancy counseling centers to post certain disclaimers.

In a 2-1 ruling Wednesday, a panel of the 4th U.S. Circuit Court of Appeals in Richmond agreed with the centers that the Baltimore and Montgomery County ordinances violated their free-speech rights.

READ MORE: Slamming Baltimore, Gov. Hogan Lays Out $150 Million 'Re-fund The Police' Plan

Greater Baltimore Center for Pregnancy Concerns, the Archbishop of Baltimore and a Roman Catholic church challenged a city ordinance requiring pregnancy counseling centers that don’t provide abortions or birth control to post disclaimers stating so. The appeals court upheld a judge’s ruling in favor of the center.

READ MORE: Baltimore Police Union Advises Officers To Not Disclose Their Vaccination Status Ahead Of City's Mandate

Centro Tepeyac Women’s Center challenged a Montgomery County ordinance requiring statements that the center doesn’t have a medical professional on staff and encourages women who may be pregnant to seek medical advice.

MORE NEWS: FDA Committee Recommends Boosters For Johnson & Johnson, Final Authorization Could Come Next Week

(Copyright 2012 by The Associated Press. All Rights Reserved.)