SNP ministers banned male-bodied prisoners from women’s jails after being ‘dragged kicking and screaming’ into obeying the law.The Scottish Prison Service (SPS), on Tuesday, switched all its trans inmates to facilities matching their biological sex after the government chose not to appeal a humiliating court defeat.But John Swinney refused to apologise for failing to act sooner - despite taxpayers facing a £400,000 bill for defending a ‘doomed’ position for more than a year.Court of Session judge Lady Ross ruled last Friday that SPS guidance allowing trans women to be caged alongside biological women was ‘unlawful’.Feminist group For Women Scotland had challenged the policy after the UK Supreme Court’s landmark ruling that equality rights are based on biological sex, not gender choice.The judgment put an end to biological men being able to use women-only spaces, but the SPS tried to stick to guidance that Lady Ross called ‘a mis-statement of the law’.Responding to the U-turn, author JK Rowling said: ‘The Scottish government has finally been dragged, kicking and screaming, into compliance with the law.’ JK Rowling said the Scottish government had to be dragged 'kicking and screaming' into obeying the lawScottish Tory equalities spokesman Meghan Gallacher added: ‘Male-bodied prisoners should have been removed from the female estate immediately following the clear ruling from the Supreme Court in April 2025.‘Instead, out-of-touch SNP ministers wasted more taxpayers’ money fighting a court case that was doomed from the start, and their reckless decision continued to put vulnerable women prisoners at risk.‘This belated and humiliating climbdown must finally signal the end for Nicola Sturgeon’s extreme gender self-ID policy.‘It has polluted Scottish public life for far too long, and John Swinney must confirm that every government body will now guarantee women access to single-sex spaces immediately.’Among the handful of trans prisoners relocated were three notorious ‘female-identifying’ murderers - Paris Green, Melissa Young and Alex Stewart - who are now in male jails.The whole saga had been sparked by the case of Isla Bryson, a double rapist who changed gender while waiting to stand trial in 2023.Bryson, 31, was initially remanded to a women's jail after being found guilty, but was then moved to a men's facility. For Women Scotland said: ‘We are pleased that the government has accepted the inevitable and will be moving these men out of female prisons.’This has been a long fight, and one which should never have been needed - especially after the Supreme Court ruling.‘The Government must now reflect on the corrosive effect publicly-funded lobbyists have had on single-sex provision who operate with no understanding of law and who have now cost the taxpayer millions.‘We remain horrified that the SPS ever thought this policy morally justified, let alone lawful.’ Isla Bryson was initially remanded to a women's jail after being found guilty, but was then moved to a men's facilityEx-SNP MP Joanna Cherry, KC, called it an ‘incredible achievement’ by the group.Mr Swinney claimed ministers had needed to test the legality of the SPS guidance because of a ‘complicated interaction’ of devolved and UK law with European convention rights.Asked if he would apologise for an outcome that always looked ‘fairly obvious’, he said: ‘The government has got to be able to seek the guidance of the courts from time to time about the interaction of complex legislation. 'I cannot apologise for that, because it’s an essential act of government to make sure that we’re acting lawfully.’Justice Secretary Neil Gray added: ‘Following careful consideration of Lady Ross’s judgment, we accept the ruling and have decided not to appeal.‘This case involved important considerations of Ministers’ legal obligations as well as the serious practical implications arising from the issues before the court, including the risk of suicide recognised in the judgment.‘The focus now moves to implementing the law, as clarified by the court.’An SPS spokesman said: ‘We have taken immediate action to withdraw the policy and will manage people in accordance with their biological sex, whilst ensuring a planned and safe transfer of the small number of individuals in prison who require to be moved.’