Shared custody of children following a divorce depends on a few factors in Spain, including how amicable the separation is, each parent's relationship with the child, their family support network, finances, and the ruling of a judge, among many other things.