Image copyright Naveed King Image caption A picture posted on Facebook showed Ashya with his mother Naghemeh King

A judge in Spain has ordered the immediate release from prison of Ashya King's parents.

The decision came after the Crown Prosecution Service decided to withdraw a European arrest warrant enabling the detention of Brett and Naghemeh King.

Prime Minister David Cameron welcomed the moves to reunite the family.

Mr and Mrs King were arrested in Spain on Saturday, after taking their son out of hospital in Southampton last week against medical advice.

Prosecutors earlier said they will face no further action and should be reunited with their son.

A CPS spokesman said it had "urgently reviewed the case" and found "insufficient evidence for a realistic prospect of conviction for any criminal offence".

"We have therefore decided to stop the criminal proceedings," he said.

In a tweet, Mr Cameron said: "I welcome the prosecution against #AshyaKing's parents being dropped.

"It's important this little boy gets treatment & the love of his family."

'Clear misunderstandings'

The CPS outlined its plans at a High Court hearing, which was brought forward by the president of the court's family division, to discuss Ashya being a ward of court.

A wardship order had been granted by a judge on Friday after an application from Portsmouth City Council.

In a statement, prosecutors said the risk to Ashya's life "was not as great or immediate as had been originally thought".

It read: "Mr and Mrs King did take certain steps to safeguard the health of Ashya, for example it appears they had ordered specialist foods to care for Ashya, and had managed to charge the food pump using their car battery.

"We continue to work with the UK courts and Spanish authorities to progress matters as quickly as possible."

Health Secretary Jeremy Hunt has described as "very unfortunate" the taking of five-year-old Ashya's parents into custody.

Media playback is unsupported on your device Media caption Jeremy Hunt said the case had been "an unfortunate sequence of events"

"There've clearly been misunderstandings along the way, but right now we want to focus on getting the right treatment for Ashya," he said.

"I hope we have a good resolution in place where they can get good independent advice that they trust."

Mr Hunt said a cancer specialist was being sent to Spain to offer advice on Ashya's case.

Mr and Mrs King are being held in a prison on the outskirts of Madrid, while their son is in hospital in Malaga.

'Secure Ashya's safety'

Hampshire's police commissioner Simon Hayes said the CPS had made the "correct decision".

However, he explained he wanted assurance "as to the quality of the information given by Southampton General Hospital to Hampshire Constabulary".

"This is the time to analyse decisions that were made," he said.

"What is important is that the Ashya's family can continue with their quest to get the medical support that he requires."

A spokesman for University Hospital Southampton NHS Foundation Trust said it was pleased that Ashya's parents would be released, but insisted it had "no option but to call the police" because it did not know the Kings' intentions.

"The police asked us to make statements about his clinical condition and need of medical care and we stand by the accuracy of the information we gave them," he said.

"No hospital should be deterred from raising the alarm when they have doubts about the safety of a child."

Earlier, Hampshire's chief constable had described Ashya's situation as "not right".

In a letter to all authorities involved in the case, Andy Marsh said the arrest warrant was only applied for in order to assist the search for him.

"Our intent was to secure his safety not to deny him family support at this particularly challenging time in his life," he wrote.

Image copyright Youtube Image caption Ashya's brother, Naveed King, said the fight to reunite Ashya with his parents was not over

Donna Jones, leader of Portsmouth City Council, said she was "clear the council was correct in its actions" to make a temporary wardship application in the case.

"This resulted in a court order that directed Ashya should be taken to the nearest appropriate hospital," she said.

More than 200,000 people have signed an online petition demanding Ashya be reunited with his parents.

The petition was delivered to Downing Street by friends of the King family.

But in a new video on YouTube Ashya's brother Naveed, said: "The fight is not over."

He thanked Mr Clegg and Mr Cameron for getting involved, and to people for "spending so many hours on social media spreading the word".

Deputy Prime Minister Nick Clegg suggested earlier that the full force of the law had not been appropriate in this case.

Correction 3 September: This article was amended to clarify the hearing on Tuesday was brought forward by the president of the High Court Family Division and not Portsmouth City Council.

Ashya King - timeline of events

Friday 29 August

Police reveal Ashya was removed from Southampton General Hospital by his parents against medical advice. They warn a battery-operated tube used to feed him is likely to have expired.

Saturday 30 August

A European arrest warrant is issued for Brett and Naghemeh King.

At 22:00 police say Ashya has been found in Spain. His parents are arrested.

Sunday 31 August

Police defend their decision to issue an arrest warrant.

Ashya's parents attend court in Velez Malaga, saying they want what is best for their son.

Monday 1 September

Relatives of Ashya say the decision to arrest his parents was "cruel". A judge in Madrid rules Mr and Mrs King must stay in custody.

The Crown Prosecution Service (CPS) says the case is under "immediate review".

Tuesday 2 September

The CPS says it is taking steps to withdraw the arrest warrant.