A judge was to decide on a judicial review into the transfer of NHS services to a social enterprise, but plans have been halted. Photograph: Graham Turner for the Guardian

Plans by NHS Gloucestershire to transfer staff and hospital services to a social enterprise have been halted on the day a judge was to decide on a judicial review.

NHS Gloucestershire had planned to move services and up to 3,000 staff working for the PCT into a community interest company – Gloucestershire Care Services (GCS) – but this was challenged in the high court by 75-year-old local resident Michael Lloyd who claimed the move was unlawful.

A judge was due to decide whether to grant a judicial review on Thursday, but NHS Gloucestershire agreed to settle the matter before the judgement.

In a joint statement with Lloyd, the PCT said: "We recognise the need for efficient use of public funds and believe that an end to legal proceedings is in everyone's interest – particularly patients. NHS Gloucestershire is pleased to be able to report that it has agreed terms to settle the judicial review. The PCT recognises that it is important to maintain the confidence of patients, public and staff in decisions made concerning NHS services in our county".

NHS Gloucestershire did however stop short of admitting it had made a mistake and said it would now be advertising for "expressions of interest for the provision of NHS services."

"In view of the matters raised in court and without in any way accepting that there is merit in the legal complaints made Lloyd, the PCT has agreed not to implement its decision to enter into a contract with GCS at this time," it said.

The PCT's chief executive Jan Stubbings had previously said that the challenge could open services up to bids from private companies – a claim rejected by campaigners.

In a letter to staff in October, she wrote: "If taken to its logical conclusion the challenge would mean that community services would be competitively tendered with the result that bodies both within and outside the NHS sector could respond."

In Thursday's statement, the PCT said it had now agreed to "start a new process to explore the best option for providing community services in Gloucestershire."

Caroline Molloy, a SATC campaigner, said the campaign would continue to keep services in the NHS.

"We hope our local health services will more remain in the NHS, publicly owned and accountable, for many years to come," she said.

"It will continue to be crucial for people to make their views known, and we well be organising a public meeting as soon as possible. We continue to collect signatures on our online petition. As Nye Bevin said, 'the NHS will continue to exist for as long as there are folk left with faith to fight for it.'"

James Beecher, a fellow SATC campaigner, said: "We are delighted that options for community health services in Gloucestershire to remain within the NHS are now back on the table."