Brett and Naghemeh King will remain in custody for up to a maximum of 72 hours, presiding National Court judge Ismael Moreno ruled on Monday afternoon.
The judge also ordered an urgent medical report on the five-year-old boy, who was taken by his parents from a hospital in southern England barely a week after he had undergone surgery.
The couple were arrested at the weekend in southern Spain on a European arrest warrant.
The couple were taken to court in a police van on Monday morning, but their hearing was delayed until the early afternoon after their lawyer failed to appear in time.
Their five-year-old son requires feeding through a nasal tube and a machine, and authorities feared his life could be in danger if he was not given the necessary hospital care.
After a two day manhunt involving British, French and Spanish police, the family was found on Saturday at a guesthouse on the Costa del Sol in southern Spain.
King said in a video posted on YouTube that he pulled his son out of hospital because he was not satisfied with the care the boy was receiving.
He said he wanted to seek different treatments abroad that were not offered by the British public healthcare system.
In another video posted on YouTube, Ashya's brother, Naveed King, defended his parents, saying the family had bought all the necessary medical supplies to ensure his brother would receive the same treatment as he had in hospital.
On Monday, the child's grandmother, Patricia King, criticized the decision to pursue and then arrest, the couple.
"It's absolutely disgraceful… (his parents) are being treated like criminals," she told BBC Breakfast.
Ashya — who last underwent surgery seven days ago — is currently under police guard in a hospital in Malaga where his condition is said to be "stable".
His parents have not been allowed to see him and his grandmother said that it was an "absolute disgrace" that a sick child was alone in hospital.
"They (the authorities) are the ones who are cruel because they have taken poor little Ashya, who is dying of a brain tumour, and they won't let the parents, my son and daughter-in-law… they won't let them see him at all," she said.
But British Police have defended their actions.
"Medical experts were saying to us that if he didn't get the care that he needed, there was a potential threat to his life," said Assistant Chief Constable of Hampshire Police Chris Shead on Sunday.
"Faced with those circumstances, I make no apology for the police being as proactive as we possibly can to actually find Ashya and ensure that he gets the help he needed," he added.