The parents of Ashya King, who were arrested after taking the five-year-old brain cancer patient from hospital without doctors' consent, are being detained in Spain for up to 72 hours.
A judge ruled that the couple must be held while the court considers whether to grant Britain an extradition request, the National Court in Madrid said.
Ashya's parents, Brett and Naghemeh King, told the judge they do not want to return to the UK.
The boy's family took him from Southampton General Hospital last Thursday and travelled on a ferry to France with him and his six siblings before heading south to the Costa del Sol in southern Spain.
Mr King, 51, and Mrs King, 45, were arrested on Saturday night in Velez-Malaga by Spanish police.
Article continues after this video.
The couple's decision to take their son out of hospital has generated heated debate on social media about their right to decide what treatment Ashya receives.
According to reports, they travelled to Spain to sell a holiday home to obtain funds for proton beam therapy, which is not available through the NHS.
Their son, who is suffering from a stage four brain tumour, is being cared for away from them at the Materno-Infantil hospital in Malaga.
Television footage yesterday showed the Kings, who are Jehovah's Witnesses, being taken to and from the court in Velez-Malaga to a police car.
Both appeared to be handcuffed as officers pushed them into the police vehicle.
Mr King could be heard saying "We just want the best for Ashya", while his wife repeated that they want the "best treatment" for their son.
In a video blog posted on YouTube, Mr King said he pleaded for proton beam therapy to be used to treat his son but had been told it would be of no benefit for the medulloblastoma Ashya is suffering.
Article continues after this video.
British police have travelled to Spain to question the couple and defended their decision to request a European arrest warrant for them on suspicion of neglect.
Assistant Chief Constable Chris Shead, of Hampshire Constabulary, said he was aware the police's approach had created a "significant amount of debate" but he would rather be criticised for "being proactive" than "potentially having to explain why a child has lost his life".
Simon Hayes, police and crime commissioner for Hampshire and the Isle of Wight, said: "This is a hugely complex and stressful human story, full of emotion that will tug on the heart strings of anyone with an ounce of compassion and sympathy.
"In particular, this is a highly emotional time for Ashya's caring parents and family, who naturally want the best for their very ill and vulnerable five-year-old son.
"Medical professionals at Southampton General Hospital had advised that Ashya's life was in 'grave danger', so the constabulary understandably acted to protect a very vulnerable sick young boy. If they had ignored professional medical advice, then they would have been negligent.
"Reality is that Hampshire Constabulary has no jurisdiction to operate outside the UK, so once Ashya's parents had taken him across the Channel there was no option but to apply for a EU arrest warrant to secure the support of other national forces to locate Ashya as soon as possible.
"A European arrest warrant is not just issued on the whim of a Hampshire police officer - the CPS and a district judge had to be satisfied that the evidence laid before them was sufficiently serious to justify the issuing of a warrant. Arrest warrants are under constant review by the CPS complex case lawyers, if circumstances change, so may the authority attached to the warrant."
South East MEP Janice Atkinson, of Ukip, called for the couple to be released immediately.
"I am appalled that Ashya's parents have been arrested. This little boy needs his mother at this time," she said. "He is five years old, probably doesn't speak Spanish, and will be lying in a hospital bed in distress.
"I call on the Home Secretary to contact the Spanish authorities so that Ashya's parents are released immediately."
Asked whether David Cameron sympathised with Ashya's parents, the Prime Minister's official spokesman told a regular Westminster media briefing: "I think people up and down the country will understand and be moved by the grave illness from which Ashya is suffering.
"First and foremost, the priority must be that he receives the very best and most appropriate medical care.
"Of course, I am sure that every parent wants to do the best for their child. That is probably the most human of human instincts."Credit: PA