SAN ANTONIO, Texas (Reuters) - A federal judge temporarily blocked key provisions of a Texas abortion law on Tuesday that would require women seeking the procedure to view a sonogram and listen to the heartbeat of their fetus.

The law, which had been due to go into effect on Thursday, was a major part of Republican Governor and presidential candidate Rick Perry's agenda in this year's Texas legislative session.

But the judge, in a victory for abortion rights activists, ruled in a preliminary injunction that there was cause to believe such a requirement was an unconstitutional burden on doctors.

"The act compels physicians to advance an ideological agenda with which they may not agree, regardless of any medical necessity, and irrespective of whether the pregnant women wish to listen," U.S. District Judge Sam Sparks said in the ruling.

He also struck down provisions that would have called for canceling a doctor's license or subjecting a physician to criminal penalty for failure to comply

The law, if the state were to later prevail in court, would require that a sonogram viewing take place 24 hours before an abortion, or two hours before the procedure for women who live over 100 miles from the abortion clinic.

In his ruling, the judge blocked the state from penalizing physicians who do not display the sonogram images in front of a pregnant woman, or have her listen to the fetus' heartbeat, if the woman declines that information.


Sparks, an Austin-based federal judge for the Western District of Texas, also took a dim view of a provision that would force women pregnant from rape or incest to certify that in writing if they do not wish to hear a doctor's explanation of the sonogram images.

"The Court need not belabor the obvious by explaining why, for instance, women who are pregnant as a result of sexual assault or incest may not wish to certify that fact in writing, particularly if they are too afraid of retaliation to even report the matter to police," Sparks wrote.

Supporters of the bill have said it was necessary to protect the rights of unborn children, while opponents said the measure was a basic intrusion into the privacy rights of women and doctors.

"When women make a decision they have done it after giving it careful thought," said attorney Julie Rikelman of the New York-based Center for Reproductive Rights, which filed the lawsuit.

"What this law assumes is outdated stereotypes that women are too immature or incompetent to make important decisions."

Texas is one of several states that have enacted legislation this year to restrict abortion, including bans on late term abortions or moves to cut state funds to health providers that perform the procedure.

Such bills were able to pass after the November 2010 elections ushered in Republican majorities in numerous state legislatures.

Perry, who is seeking the Republican presidential nomination, said the goal of the law was to make sure women have all information necessary to make an informed decision on an important medical procedure. He and Texas Attorney General Greg Abbott, also a Republican, vowed to appeal the ruling.

"Every life lost to abortion is a tragedy and today's ruling is a great disappointment to all Texans who stand in defense of life," Perry said in a statement.

The case is expected to be appealed to the U.S. Supreme Court.

(Reporting by Jim Forsyth, Writing by Jim Forsyth and Cynthia Johnston, Editing by Alex Dobuzinskis)

Mochila insert follows.