Arkansas adopted what is by far the country’s most restrictive ban on abortion on Wednesday — at 12 weeks of pregnancy, when a fetal heartbeat can typically be detected by abdominal ultrasound.

State Senator Jason Rapert, right, sponsored the “Human Heartbeat Protection Act”

The law, the sharpest challenge yet to Roe v. Wade, was passed by the newly Republican-controlled legislature over the veto of Gov. Mike Beebe, a Democrat, who called it “blatantly unconstitutional.” The State Senate voted Tuesday to override his veto and the House followed suit on Wednesday, with several Democrats joining the Republican majority.

The law contradicts the limit established by Supreme Court decisions, which give women a right to an abortion until the fetus is viable outside the womb, usually around 24 weeks into pregnancy, and abortion rights groups promised a quick lawsuit to block it. Even some anti-abortion leaders called the measure a futile gesture.

Adoption of the law, called the Human Heartbeat Protection Act, is the first statewide victory for a restless emerging faction within the anti-abortion movement that has lost patience with the incremental whittling away at abortion rights — a strategy used by groups like National Right to Life and the Catholic Church while they wait for a more sympathetic Supreme Court.

“When is enough enough?” asked the bill’s sponsor in the legislature, Senator Jason Rapert, a Republican, who compared the more than 50 million abortions in the United States since the 1973 Roe v. Wade decision to the Holocaust and the Rwandan genocide. “It’s time to take a stand.”

But abortion rights groups and many legal experts, including some in the anti-abortion movement, say the law so deeply contradicts existing constitutional doctrine that it may quickly be voided.

“The 12-week ban actually bars abortion within the first trimester,” said Nancy Northup, president of the Center for Reproductive Rights in New York. “It has no chance of surviving a court challenge.”

The center and the American Civil Liberties Union have vowed to bring a case in federal court, aiming to head off the law before it takes effect, 90 days after the legislature adjourns in the next month or so.

Senator Rapert, who cited strong backing for his bill from conservative evangelical groups like the Arkansas Family Council, hopes the law will start a groundswell of support. “We crafted a bill that apparently has the ability to stand the test in courts and change abortion policy in our nation coast to coast,” he said in an interview this week.

But so far, more radical measures elsewhere have fallen short. In Mississippi a so-called personhood amendment lost at the polls, while in Ohio a “fetal heartbeat” bill resembling that in Arkansas was defeated in the legislature, in part because it was opposed by one of the state’s leading anti-abortion groups, Ohio Right to Life.

Those proposals have caused soul-searching and dissension within some of the largest anti-abortion groups, with many traditional leaders expressing skepticism or opposition to such sweeping challenges to constitutional law until a more conservative Supreme Court seems ready to scrap the legacy of Roe v. Wade.

Much like Tea Party activists, who have caused exasperation among Republican leaders with demands to slash budgets almost indiscriminately, the abortion rebels feel there is little to lose by pushing for aggressive curbs and testing the courts. But other anti-abortion leaders say that strategy, exemplified by the Arkansas law, is likely to backfire, causing courts to endorse the current limits and wasting resources that could bring real, if smaller, gains.

“As much as we would like to protect the unborn at that point, it is futile and it won’t save any babies,” said James Bopp Jr., a prominent anti-abortion lawyer who opposed the Arkansas law. Mr. Bopp, who lives in Indiana, is general counsel of National Right to Life.

He said that lower courts are virtually certain to affirm existing Supreme Court rulings and, like many other legal experts, he predicted that the Supreme Court was very unlikely to agree to hear such a case.

Mr. Rapert originally proposed setting the Arkansas ban even earlier, at about six weeks after a woman’s last menstrual period. But the nascent fetal heartbeat can be detected at that point only by using intrusive technology like a trans-vaginal ultrasound.

Wary of the national firestorm that erupted last year after Virginia tried to require the intrusive procedure, Mr. Rapert and his allies revised the bill to specify that a fetal heartbeat should be detected by abdominal ultrasound or other external methods, which are not feasible at six weeks.

The strategy of incrementally narrowing abortion rights has yielded results, especially since 2010, when Republicans gained control of many more states. Measures have been adopted by the dozens in the past few years, including waiting periods, parental consent for minors, ultrasound requirements and stringent regulations aimed at making it harder for abortion clinics to operate.

In Mississippi, a rule requiring doctors performing abortions to have visiting privileges at local hospitals threatens to close down the state’s only remaining abortion clinic, which relies on traveling doctors. A court decision on the measure is expected any day.

Ten states have pushed time limits for abortions down to 20 weeks into pregnancy on the theory, disputed by most medical experts, that a fetus can feel pain by then. Such laws have wider support in the anti-abortion movement. Arkansas adopted a 20-week ban over the governor’s veto last week, and most who supported it went on to vote for Mr. Rapert’s more stringent bill as well.

The 20-week laws also violate the existing standard of fetal viability. They are under legal challenge in Arizona and Georgia, and on Wednesday, a federal judge ruled the 20-week ban in Idaho to be unconstitutional, Reuters reported. But the laws are in effect in seven other states. Very few abortions take place so late in pregnancy, and those are often for serious medical reasons that may be permitted in any case.

By contrast, a 12-week ban would affect an estimated 12 percent to 15 percent of abortions nationwide, said Elizabeth Nash, state issues manager with the Guttmacher Institute, a research group in Washington that supports abortion rights. In Arkansas in 2011, 4,033 abortions were performed; 815 of them, or 20 percent, were at 12 weeks or more after the last menstrual period, according to state data. How many of these later procedures involved medical emergencies or cases of rape or incest — exceptions allowed under the new law — is not known.

The state currently has only one clinic, in Little Rock, that performs surgical abortions; a second, run by Planned Parenthood, offers medicinal abortions, which are done only within the first eight weeks of pregnancy.

The final approval of the bill on Wednesday was a surprisingly unemotional event, with the House consideration of the override taking only moments — less time than it took just before to recognize a college volleyball team.

With the outcome, at 55 votes to 33, a foregone conclusion in a state that has turned steadily to the right in recent years, two House Republican leaders spoke briefly in favor of the bill, and not a single legislator spoke against it.

Representative Ann V. Clemmer, the bill’s House sponsor, called it “a statement consistent with what Arkansas voters want.”

“It will be tested,” she said. “I’m O.K. with that. That’s the job of the courts.”

Abortion rights advocates, however, watched the legislation with chagrin.

“It sets Arkansas back several decades in the eyes of the nation and the world,” said Rita Sklar, director of the American Civil Liberties Union of Arkansas. “It shows an utter disregard for women and their ability to make important personal decisions about their own reproductive health.”