A federal judge has temporarily blocked a near-total ban on abortion in Texas, following a challenge from the Biden administration.

US District Judge Robert Pitman in Austin granted the request, preventing the state from enforcing the Republican-backed law, while its legality is being challenged.

The controversial law prohibits women from obtaining an abortion after six weeks of pregnancy - a time when many women do not yet know they are pregnant.

It makes no exceptions for pregnancies caused by rape or incest.

"This court will not sanction one more day of this offensive deprivation of such an important right," Judge Pitman said in the ruling.

The ink was barely dry on Judge Pitman's order before Texas notified the court that it intends to appeal the ruling to the conservative-leaning Fifth Circuit Court of Appeals, setting the stage for the next phase of the legal battle.

"Tonight's ruling is an important step forward toward restoring the constitutional rights of women across the state of Texas," White House press secretary Jen Psaki said in a statement.

"The fight has only just begun, both in Texas and in many states across this country where women's rights are currently under attack," she added.

Mr Biden's Justice Department sued Texas last month and sought a temporary injunction against the law, arguing during a 1 October hearing that the measure violates the US Constitution.

The US Supreme Court on 1 September let the law take effect in a 5-4 vote powered by conservative justices.

The law also lets ordinary citizens enforce the ban, rewarding them at least $10,000 (€8,655) if they successfully sue anyone who helped provide an abortion after fetal cardiac activity is detected.

Critics of the law have said this provision enables people to act as anti-abortion bounty hunters.

The Justice Department argued that the law impedes women from exercising their constitutional right to terminate a pregnancy that was recognised in the Supreme Court's 1973 Roe v. Wade decision that legalised abortion nationwide.

The department also argued that the law improperly interferes with the operations of the federal government to provide abortion-related services.

US Attorney General Merrick Garland lauded the ruling as a "victory for women in Texas".

Planned Parenthood said the preliminary injunction means lawsuits filed under the law cannot be accepted by Texas courts.

"The relief granted by the court today is overdue, and we are grateful that the Department of Justice moved quickly to seek it," Planned Parenthood CEO Alexis McGill Johnson said in a statement.

Whole Woman's Health, which has four clinics in Texas, said it was making plans to resume abortions up to 18 weeks "as soon as possible".

Texas Governor Greg Abbott, a Republican, has defended the legality of the state's abortion law, with this office saying in a statement: "The most precious freedom is life itself."

Judge Pitman heard about three hours of arguments on the Justice Department's request.

Justice Department attorney Brian Netter called the law an "unprecedented scheme of vigilante justice" that must be struck down.

Will Thompson, an attorney in the Texas Attorney General's Office, countered the department's arguments, saying there were plenty of opportunities for people in Texas to challenge the law on their own.

He said the department's arguments were filled with "hyperbole and inflammatory rhetoric".

This case is part of a fierce legal battle over abortion access in the US, with numerous states pursuing restrictions.

US conservatives have long sought to have Roe v Wade overturned.

The Supreme Court on 1 December will hear arguments in a separate case involving a Mississippi law that bans abortions after 15 weeks of pregnancy.

Mississippi has asked the high court to overturn the 1973 precedent.