Juana Rivas accuses her ex-partner of domestic violence and after running away last year from Italy where they lived with their boys, aged 11 and three, she refused to let him see them.
When a court ordered her to hand them over to her Italian ex-partner, Francesco Arcuri, in July, she went into hiding for one month with her children, before turning herself in last week to a court in the southern city of Granada.
She was released but ordered to hand the kids over by Monday, which she did, according to a spokeswoman for the central government's representative office in Granada.
"She handed them over to the Guardia Civil (police force)," she said, without giving further details.
Spanish media said that Arcuri would come to fetch the children later on Monday. He is now able to take them back to Italy.
In a July interview with Italy's Ansa news agency, Arcuri, who was found guilty of abusing Rivas in 2009, denied any violence.
"I want to be able to hold my children again in my arms, I haven't seen them since last year," he said.
Rivas's plight sparked a vivid debate in Spain, where the struggle against domestic violence is a top government priority.
While some supported her, others criticised her for breaking the law.
"I find it crazy that she hands over the kids to an abuser, I hope the judge won't come to repent what he has done," tweeted @palomaanaunica.
#juanarivasarv Me parece demencial que se entregue los niños a un maltratador, espero q el juez no se tenga q arrepentir de lo q ha hecho.— paloma (@palomaanaunica) August 28, 2017
"#JuanaRivasARV has opened her eyes and realising she may go to prison, she handed over the children," retorted @enavicens, using the trending Twitter hashtag on the case.
"But she will have to be tried for what she did."
#JuanaRivasARV ha abierto los ojos y al verse en prisión ha entregado a los niños. Pero tendrá que ser juzgada por lo que ha hecho.— Enrique Navarro (@enavicens) August 28, 2017