The move opened the way for Brett and Naghemeh King to leave jail in Madrid and be reunited with their son, who has a brain tumour and is being treated in a hospital in Malaga, southern Spain.
Judge Fernando Andreu at the National Court in Madrid "has just ordered the immediate release of Brett and Naghemeh King" after Britain's Crown Prosecution Service withdrew its extradition order, the source told AFP late Tuesday.
Brett King, 51, and Naghemeh King, 45, were arrested in Spain under a European arrest warrant for taking five-year-old Ashya out of hospital in England after disagreeing with doctors over his cancer treatment.
"The summons scheduled for tomorrow is rendered void and the judicial proceedings will be shelved," said the judicial source in Madrid, who asked not to be named.
Also Read
Public sympathy in Britain had grown for the couple, who are seeking alternative treatment for Ashya.
After the British prosecutors' announcement, British Prime Minister David Cameron welcomed the news on his Twitter feed, saying: "It's important this little boy gets treatment & the love of his family."
The Kings are planning to sell their apartment in Malaga to fund proton beam therapy, an alternative to radiotherapy, for their son, according to their Spanish lawyer Juan Isidro Fernandez Diaz.
After the family left Britain with their seven children, police applied for an arrest warrant over fears that the condition of Ashya, who has undergone surgery and has to be fed through a special piece of equipment, could deteriorate.
The parents were detained on Saturday but the case has prompted an outcry in Britain, where some 130,000 people signed a petition calling for the boy to be reunited with his parents.