Madonna began adoption proceedings for David Banda in 2006
A court in Malawi has given final approval for pop star Madonna to adopt a young boy from the country.
The ruling comes 18 months after she began adoption proceedings for David Banda, who is now two.
Justice Andrew Nyirenda said he was satisfied Madonna and husband Guy Ritchie were "perfect parents".
The boy's father, Yohane, said he was pleased the adoption was successful. "I am glad it's all over," he said. "I am glad David has a new, good home."
Madonna was granted a temporary custody order after choosing David from an orphanage when he was 13 months old in October 2006.
The full adoption was recommended by a social worker who visited Madonna and her family at their London home.
He found that David had been provided with "love, [a] safe home environment, care, protection [and] material, as well as emotional support".
Madonna was not in court for the ruling.
Her lawyer, Alan Chinula, told reporters outside the courthouse in Malawi's capital, Lilongwe: "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."
Madonna recently spoke about the criticism she had received from the media in the course of the adoption.
"It was painful and it was a big struggle and I didn't understand it," she told reporters at the Cannes Film Festival.
"But in the end, I rationalised that, when a woman has a child and goes through natural childbirth, she suffers an enormous amount.
"So I sort of went through my own kind of birthing pains with dealing with the press on my front doorstep, accusing me of kidnapping, or whatever you want to call it.
"I had to go through some kind of process and in the end it made me stronger, so I can't complain."
The adoption has been controversial, with critics accusing the government of skirting laws that ban non-residents from adopting children in Malawi.
The country has been badly hit by an Aids epidemic which has left more than a million orphans.
David was put in the orphanage by Yohane after his mother died of an Aids-related illness when he was a month old.
His father said he believed he could not care for him alone, and that placing him in an orphanage was the best way to ensure his survival.
Madonna has two other children: an 11-year-old daughter Lourdes with her former personal fitness trainer Carlos Leon, and seven-year-old son Rocco with Guy Ritchie.