Updated

Texas Gov. Rick Perry signed sweeping new abortion restrictions on Thursday that could shutter most of the clinics in the state.

More than 100 Republican lawmakers attended the signing ceremony with a small band of protesters outside dressed in black and holding a sign that read, "Shame." The legislation had sparked weeks of protests at the state Capitol.

The new law bans abortions after the 20th week of pregnancy and dictates when abortion-inducing drugs can be taken. But it also requires abortion clinic doctors to have hospital admitting privileges and restricts abortions to surgical centers. Only five of Texas' 42 abortion clinics currently meet the new requirements.

The law will take effect in October and clinics will have a year to upgrade their facilities or shutdown.

Perry said the new law "builds upon our commitment to protecting life in the state of Texas."

Perry and other top Republican politicians in the state made passing the law a top priority to please supporters before the primary election in March. They failed to pass the bill last month on the last day of a special legislative session because of a Democratic state senator's lengthy filibuster and a raucous crowd. But they were successful last week after Perry called a second special session for that reason.

Supporters of the law argue that it will ensure high-quality health care for women and fetuses, but opponents view it as over-regulation intended to make abortions harder to obtain.

Federal judges have blocked enforcement of similar measures in other states, questioning their constitutionality. Opponents are expected to file similar suits in Texas now that Perry has signed the law.