Loosely based in the case of judge Karen Atala Riffo who is a Chilean judge and lesbian mother of three daughters. Atala was separated from her husband in 2001, and originally reached a settlement with her ex-husband that she would retain custody of the children. When Atala came out as a lesbian in 2005, however, the ex-husband sued for custody, where the case was eventually heard by the Supreme Court of Chile. That court awarded the husband custody, saying that Atala's relationship put the development of her children at risk.