A lawyer for the 49-year-old star said: "We are very happy with what the judge has ruled. It is a positive and beautiful judgment that will have an impact on Malawi's adoption laws." David's biological father Yohane Banda revealed he is delighted for Madonna and Guy and wished them luck in the future.
He said: "I am glad this is over now. I am happy for David. "I gave Madonna 100 per cent rights for my son. He is her son. It's because of her benevolent nature that she assured me she will not cut ties with me. "We wish David and his mother, new dad, sister and brother would join us. We are now family." Madonna caused great controversy when she first began the process of adopting David in October 2006.
Critics claimed the Malawi government had given the singer special treatment by ignoring laws banning non-residents from adopting children in the country. It was also revealed that while David's mother had died, his father was still alive and had been visiting him in his orphanage.
Madonna - who has two other children, Lourdes, 11, and seven-year-old Rocco - recently said the adoption process was like "natural childbirth". She said: "It was painful and a big struggle and I didn't understand it. In the end, I rationalised that when a woman goes through natural childbirth, she suffers an enormous amount. I went through my own kind of birthing pains."