The case involves at least three babies who changed hands since 2006, but police suspect there may be more. The ring allegedly targeted birth mothers in financial need, police said.
"We have evidence of the sale of a child, who perhaps went to a family enthused to have a baby," said police director Jorge Rojas. "But this trafficking is prohibited by law. Even though it was a direct deal, in which the mother handed over the child, it was in exchange for money."
Two social workers were also detained. No formal charges have been filed in the case.
The judge allegedly signed adoption papers, apparently in return for a portion of the price paid by the adoptive parents, investigators said. The detained lawyer was the alleged mastermind, and the social workers may have channeled needy mothers into the ring, investigators added.
Police found photos of 4,000 children at the home of one of the detained women.