The bill, which does not include exceptions in cases of rape and incest, passed 26-6 in the senate and was later signed into law by Alabama’s Republican governor Kay Ivey.

“As most people know, and for those who would like to know, I am strongly Pro-Life, with the three exceptions – Rape, Incest and protecting the Life of the mother – the same position taken by Ronald Reagan,” Mr Trump tweeted late on Saturday night.

“We have come very far in the last two years with 105 wonderful new Federal Judges (many more to come), two great new Supreme Court Justices, the Mexico City Policy, and a whole new & positive attitude about the Right to Life.

“The Radical Left, with late term abortion (and worse), is imploding on this issue. We must stick together and Win for Life in 2020. If we are foolish and do not stay UNITED as one, all of our hard fought gains for Life can, and will, rapidly disappear!”

Legislation to restrict abortion rights has been introduced this year in 16 states, four of whose governors have signed bills banning abortion if an embryonic heartbeat can be detected.

The Alabama bill goes further, banning abortions at any time. Those performing abortions would be committing a felony, punishable by 10 to 99 years in prison, although a woman who receives an abortion would not be held criminally liable.

Alabama Republicans hope the law change, which will not take effect for six months and is already facing lawsuits, will ultimately end up being contested in the US Supreme Court.

Republican senator Clyde Chambliss, arguing in favour of the Alabama bill, said the whole point was “so that we can go directly to the Supreme Court to challenge Roe v Wade”, the 1973 landmark decision establishing a woman’s right to an abortion.

The issue looks set to become a central one in the upcoming 2020 elections, with a number of Democratic presidential candidates having already declared their intention to challenge attempts to outlaw abortions.

“Even as states like Georgia, Alabama, Kentucky, Ohio, and Mississippi are hell-bent on overturning Roe v Wade and outlawing abortion in this country, there are more of us across the country who are ready to defend women’s reproductive freedom. We won’t go backward,” Senator Kamala Harris tweeted on Saturday.