A divided US Supreme Court stopped Louisiana from enforcing new regulations on abortion clinics in a test of the conservative court’s views on abortion rights.

The justices said by a 5-4 vote late Thursday that they will not allow the state to put into effect a law that requires abortion providers to have admitting privileges at nearby hospitals.

Chief Justice John Roberts joined the court’s four liberals in putting a hold on the law, pending a full review of the case.

Donald Trump’s two Supreme Court appointees, Justices Neil Gorsuch and Brett Kavanaugh, were among the four conservative members of the court who would have allowed the law to take effect.

Justice Kavanaugh wrote a dissenting opinion in which he said the court’s action was premature because the state had made clear it would allow abortion providers an additional 45 days to obtain admitting privileges before it started enforcing the law.

Women's march 2019 – global protest in pictures Show all 30 1 /30 Women's march 2019 – global protest in pictures Women's march 2019 – global protest in pictures Berlin People hold up posters reading among others "We have the right to be heard" as they take part in a Women's March on January 19, 2019 in Berlin. - The Women's March movement that has started in the US and has become global supports women's rights, fights for an end to the gender pay gap and aims to bring awareness to violence against women and demand action to end it. (Photo by Odd ANDERSEN / AFP)ODD ANDERSEN/AFP/Getty Images ODD ANDERSEN AFP/Getty Women's march 2019 – global protest in pictures London Women's march for “bread and roses” – rally against austerity in London Angela Christofilou Angela Christofilou/The Independent Women's march 2019 – global protest in pictures New York A girl takes part in a march organized by the Women's March Alliance in the Manhattan borough of New York City, U.S., January 19, 2019. REUTERS/Caitlin Ochs CAITLIN OCHS Reuters Women's march 2019 – global protest in pictures Washington Thousands of people participate in the Third Annual Women's March at Freedom Plaza in Washington, U.S., January 19, 2019. REUTERS/Joshua Roberts JOSHUA ROBERTS Reuters Women's march 2019 – global protest in pictures New York Demonstrators emphasizing gun violence take part in a march organized by the Women's March Alliance in the Manhattan borough of New York City, U.S., January 19, 2019. REUTERS/Caitlin Ochs CAITLIN OCHS Reuters Women's march 2019 – global protest in pictures London epa07300308 Protesters with a placard 'End Period Poverty' take part in 2019 Women's March in Central London, Britain, 19 January 2019. Thousands of protesters called for greater protection and rights for women and end of austerity in Britain. EPA/WILL OLIVER WILL OLIVER EPA Women's march 2019 – global protest in pictures Washington Thousands of people participate in the Third Annual Women's March at Freedom Plaza in Washington, U.S., January 19, 2019. REUTERS/Joshua Roberts JOSHUA ROBERTS REUTERS Women's march 2019 – global protest in pictures New York Demonstrators take part in a march organized by the Women's March Alliance in the Manhattan borough of New York City, U.S., January 19, 2019. REUTERS/Caitlin Ochs CAITLIN OCHS Reuters Women's march 2019 – global protest in pictures Berlin A woman holds up a poster as she takes part in a Women's March in front of the Brandenburg Gate on January 19, 2019 in Berlin. - The Women's March movement that has started in the US and has become global supports women's rights, fights for an end to the gender pay gap and aims to bring awareness to violence against women and demand action to end it. (Photo by Odd ANDERSEN / AFP)ODD ANDERSEN/AFP/Getty Images ODD ANDERSEN AFP/Getty Women's march 2019 – global protest in pictures Washington Baby Trump balloons float over thousands of people as they participate in the Third Annual Women's March at Freedom Plaza in Washington, U.S., January 19, 2019. REUTERS/Joshua Roberts JOSHUA ROBERTS Reuters Women's march 2019 – global protest in pictures London Women's march for “bread and roses” – rally against austerity in London Angela Christofilou Angela Christofilou/The Independent Women's march 2019 – global protest in pictures New York Protesters hold signs during the Women's Unity Rally at Foley Square on January 19, 2019 in New York City. (Photo by Angela Weiss / AFP)ANGELA WEISS/AFP/Getty Images ANGELA WEISS AFP/Getty Women's march 2019 – global protest in pictures London Women's march for “bread and roses” – rally against austerity in London Angela Christofilou Angela Christofilou/The Independent Women's march 2019 – global protest in pictures London Women's march for “bread and roses” – rally against austerity in London Angela Christofilou Angela Christofilou/The Independent Women's march 2019 – global protest in pictures Washington Thousands of people participate in the Third Annual Women's March at Freedom Plaza in Washington, U.S. January 19, 2019. REUTERS/Erin Scott ERIN SCOTT REUTERS Women's march 2019 – global protest in pictures Washington Resist signs are held aloft as thousands of people participate in the Third Annual Women's March at Freedom Plaza in Washington, U.S., January 19, 2019. REUTERS/Joshua Roberts JOSHUA ROBERTS Reuters Women's march 2019 – global protest in pictures Berlin BERLIN, GERMANY - JANUARY 19: People attend the Women's March 2019 protest for more women's rights on January 19, 2019 in Berlin, Germany. Organized by Democrats Abroad, the event coincides with Women's Marches taking place today across the USA. (Photo by Carsten Koall/Getty Images) Carsten Koall Getty Images Women's march 2019 – global protest in pictures London Protesters take part in the Women's March calling for equality, justice and an end to austerity in London, Britain January 19, 2019. REUTERS/Simon Dawson SIMON DAWSON Reuters Women's march 2019 – global protest in pictures Berlin BERLIN, GERMANY - JANUARY 19: People attend the Women's March 2019 protest for more women's rights on January 19, 2019 in Berlin, Germany. Organized by Democrats Abroad, the event coincides with Women's Marches taking place today across the USA. (Photo by Carsten Koall/Getty Images) Carsten Koall Getty Images Women's march 2019 – global protest in pictures London Women's march for “bread and roses” – rally against austerity in London Angela Christofilou Angela Christofilou/The Independent Women's march 2019 – global protest in pictures Berlin epa07299365 A woman holds a sign reading 'Rise up and resist' during the 2019 Wome's March in Berlin, Germany, 19 January 2019. The march is to support women's rights, against racism and violence against women. EPA/MARKUS HEINE MARKUS HEINE EPA Women's march 2019 – global protest in pictures London Women's march for “bread and roses” – rally against austerity in London Angela Christofilou Angela Christofilou/The Independent Women's march 2019 – global protest in pictures Berlin epa07299373 A woman holds a sign reading 'I'm not ovary acting' during the 2019 Wome's March in Berlin, Germany, 19 January 2019. The march is to support women's rights, against racism and violence against women. EPA/MARKUS HEINE MARKUS HEINE EPA Women's march 2019 – global protest in pictures London Protesters take part in the Women's March calling for equality, justice and an end to austerity in London, Britain January 19, 2019. REUTERS/Simon Dawson SIMON DAWSON Reuters Women's march 2019 – global protest in pictures London REFILE - ADDING RESTRICTIONS Protesters hold up signs in the Women's March calling for equality, justice and an end to austerity in London, Britain January 19, 2019. REUTERS/Simon Dawson TEMPLATE OUT SIMON DAWSON Reuters Women's march 2019 – global protest in pictures Berlin BERLIN, GERMANY - JANUARY 19: People attend the Women's March 2019 protest for more women's rights on January 19, 2019 in Berlin, Germany. Organized by Democrats Abroad, the event coincides with Women's Marches taking place today across the USA. (Photo by Carsten Koall/Getty Images) Carsten Koall Getty Images Women's march 2019 – global protest in pictures London Women's march for “bread and roses” – rally against austerity in London Angela Christofilou Angela Christofilou/The Independent Women's march 2019 – global protest in pictures Berlin epa07299383 A man holds a sign with the reading 'here for my sisters' during the 2019 Women's March in Berlin, Germany, 19 January 2019. The march is to support women's rights, against racism and violence against women. EPA/MARKUS HEINE MARKUS HEINE EPA Women's march 2019 – global protest in pictures London Women's march for “bread and roses” – rally against austerity in London Angela Christofilou Angela Christofilou/The Independent Women's march 2019 – global protest in pictures London Women's march for “bread and roses” – rally against austerity in London Angela Christofilou Angela Christofilou/The Independent

If the doctors succeed, they can continue performing abortions, he said. If they fail, they could return to court, Brett Kavanaugh said.

The law is very similar to a Texas measure the justices struck down three years ago. John Roberts dissented in that case.

But the composition of the court has changed since then, with Kavanaugh replacing Justice Anthony Kennedy, who voted to strike down the Texas law. Mr Trump had pledged during the campaign to appoint “pro-life” justices, and abortion opponents are hoping the more conservative bench will be more open to upholding abortion restrictions.

Louisiana abortion providers and a district judge who initially heard the case said one or maybe two of the state’s three abortion clinics would have to close under the new law. There would be at most two doctors who could meet its requirements, they said.

But the federal appeals court in New Orleans rejected those claims, doubting that any clinics would have to close and saying the doctors had not tried hard enough to establish relationships with local hospitals.

In January, the full appeals court voted 9-6 not to get involved in the case, setting up the Supreme Court appeal.

Support free-thinking journalism and attend Independent events

The law had been scheduled to take effect Monday, but Justice Samuel Alito delayed the effective date at least through Thursday to give the justices more time. He and Justice Clarence Thomas were the other dissenters Thursday.

The justices could decide this spring whether to add the case to their calendar for the term that begins in October.