The Supreme Court has ended constitutional protections for abortion that have been in place for nearly 50 years in a decision by its conservative majority to overturn Roe v Wade.

The ruling is expected to lead to abortion bans in roughly half of US states.

The decision was the culmination of decades of efforts by abortion opponents, made possible by an emboldened right side of the court that has been fortified by three appointees of former president Donald Trump.

Mr Trump took credit for the decision, saying in a statement that the ruling was “the biggest win for life in a generation”.

He said the rulings and others “were only made possible because I delivered everything as promised, including nominating and getting three highly respected and strong constitutionalists confirmed to the United States Supreme Court.

“It was my great honour to do so.”

The ruling came more than a month after the stunning leak of a draft opinion by Justice Samuel Alito indicating the court was prepared to take this momentous step.

It puts the court at odds with a majority of Americans who favoured preserving Roe, according to opinion polls.

Justice Alito, in the final opinion issued on Friday, wrote that Roe and Planned Parenthood v Casey, the 1992 decision that reaffirmed the right to abortion, was wrong the day it was decided and must be overturned.

Authority to regulate abortion rests with the political branches, not the courts, Justice Alito wrote.

Joining him were Justices Clarence Thomas, Neil Gorsuch, Brett Kavanaugh and Amy Coney Barrett. The latter three justices are Trump appointees. Justice Thomas first voted to overrule Roe 30 years ago.

Chief Justice John Roberts would have stopped short of ending the abortion right, noting that he would have upheld the Mississippi law at the heart of the case, a ban on abortion after 15 weeks, and said no more.

Justices Stephen Breyer, Sonia Sotomayor and Elena Kagan — the diminished liberal wing of the court — were in dissent.

The ruling is expected to disproportionately affect minority women who already face limited access to healthcare, according to statistics analysed by The Associated Press.

Thirteen states, mainly in the South and Midwest, already have laws on the books that ban abortion in the event Roe is overturned. Another half-dozen states have near-total bans or prohibitions after six weeks of pregnancy, before many women know they are pregnant.

In roughly a half-dozen other states, the fight will be over dormant abortion bans that were enacted before Roe was decided in 1973 or new proposals to sharply limit when abortions can be performed, according to the Guttmacher Institute, a research group that supports abortion rights.

In Wisconsin, which has an 1849 abortion ban on the books, Planned Parenthood immediately halted all scheduled abortions at its clinics in Madison and Milwaukee following the court’s ruling.

More than 90% of abortions take place in the first 13 weeks of pregnancy, and more than half are now done with pills, not surgery, according to data compiled by Guttmacher.

The decision came against a backdrop of public opinion surveys that find a majority of Americans oppose overturning Roe and handing the question of whether to permit abortion entirely to the states.

Polls conducted by The Associated Press-NORC Centre for Public Affairs Research and others also have consistently shown about one in 10 Americans want abortion to be illegal in all cases. A majority are in favour of abortion being legal in all or most circumstances but polls indicate many also support restrictions especially later in pregnancy.

The Biden administration and other defenders of abortion rights have warned that a decision overturning Roe would threaten other high court decisions in favour of gay rights and even potentially, contraception.

Supreme Court AbortionNoisy protests took place outside the court (Steve Helber/AP)

But Justice Alito wrote in his draft opinion that his analysis addresses abortion only, not other rights that also stem from a right to privacy that the high court has found implicit, though not directly stated, in the constitution. Abortion is different, Justice Alito wrote, because of the unique moral question it poses.

Whatever the intentions of the person who leaked Justice Alito’s draft opinion, the conservatives held firm in overturning Roe and Casey.

In his draft, he dismissed the arguments in favour of retaining the two decisions, including that multiple generations of American women have partly relied on the right to abortion to gain economic and political power.

Changing the composition of the court has been central to the anti-abortion side’s strategy.

Mississippi and its allies made increasingly aggressive arguments as the case developed, and two high-court defenders of abortion rights retired or died.

The state initially argued that its law could be upheld without overruling the court’s abortion precedents.

Supreme Court AbortionMembers of the Supreme Court were split (Erin Schaff/The New York Times via AP)

Then-governor Phil Bryant signed the 15-week measure into law in March 2018, when Justices Anthony Kennedy and Ruth Bader Ginsburg were still members of a five-justice majority that was mainly protective of abortion rights.

By early summer, Justice Kennedy had retired and was replaced by Justice Brett Kavanaugh a few months later. The Mississippi law was blocked in lower federal courts.

But the state was always heading to the nation’s highest court. It did not even ask for a hearing before a three-judge panel of the 5th US Circuit Court of Appeals, which ultimately held the law invalid in December 2019.

By early September 2020, the Supreme Court was ready to consider the state’s appeal.

The court scheduled the case for consideration at the justices’ private conference on September 29. But in the intervening weeks, Justice Ginsburg died and Justice Barrett was quickly nominated and confirmed without a single Democratic vote.

The stage now was set, although it took the court another half year to agree to hear the case.

Supreme Court AbortionPeople protest about abortion outside the Supreme Court (Steve Helber/AP)

By the time Mississippi filed its main written argument with the court in the summer, the thrust of its argument had changed and it was now calling for the wholesale overruling of Roe and Casey.

The first sign that the court might be receptive to wiping away the constitutional right to abortion came in late summer, when the justices divided 5-4 in allowing Texas to enforce a ban on the procedure at roughly six weeks, before some women even know they are pregnant.

That dispute turned on the unique structure of the law, including its enforcement by private citizens rather than by state officials, and how it can be challenged in court.

Justice Barrett was perhaps the most vocal opponent of abortion in her time as a law professor, before becoming a federal judge in 2017.

She was a member of anti-abortion groups at Notre Dame University, where she taught law, and she signed a newspaper ad opposing “abortion on demand” and defending “the right to life from fertilisation to natural death”. She promised to set aside her personal views when judging cases.

Mr Trump had predicted as a candidate that whoever he named to the court would “automatically” vote to overrule Roe.