The court in the southern city of Granada ruled that Juana Rivas was "exploiting the argument of abuse" to retain custody of her sons, now aged 12 and four, and ordered her to pay 30,000 euros ($35,000) in compensation and her ex-partner's legal costs.
It also ruled she cannot have custody of her children for six years, accusing her of "child abduction."
Rivas ran away from Sardinia in May 2016 and filed a complaint of domestic abuse against her then Italian partner Francesco Arcuri in July that year, which he denied.
The custody battle leapt into the limelight in July 2017 when a court ordered her to hand the children over to Arcuri.
- Chapter closes on public custody battle that divided Spain
- Fugitive mum whose plight divided Spain turns herself in
- Plight of mother-of-two 'abuse victim' shakes Spain
She went into hiding for one month with her children, before turning herself in to a court in Granada and handing over the kids.
Her plight sparked a vivid debate in Spain, where the struggle against domestic violence is a top government priority.
While some criticised her for breaking the law and cast doubt on her claims, others supported her, pointing out that Arcuri had already been condemned for domestic abuse in 2009.
The Granada court acknowledged this, saying he had been found guilty of hitting Rivas when they lived in Spain after confronting her for coming home around five in the morning.
But it argued the couple had later decided to give it another go, that Rivas moved to Italy and they had a second child.
In her 2016 complaint, Rivas said she lived through hell while in Sardinia, saying Arcuri would "lock her up in a room for hours, hit her, spit in her face, pull her hair," according to the court ruling.
She also said her children, particularly the eldest, had "suffered a lot and been witness to various things."
But the court said a psychologist had examined their eldest son and had found no trace of trauma linked to domestic abuse.
It added there was no evidence of any abuse after the 2009 incident.
"The facts show that she decided to separate (from Arcuri) in the summer of 2016 and... she realised there would be a big stumbling block with custody of the two children," the court concluded.
"To get custody, she decided to exploit the argument of abuse."
Her sentence caused a major stir in Spain, becoming the biggest trending topic on Twitter.
Twitter user @ajtferrer said Rivas had used "the very real violence that many women actually suffer for her own ends," echoing many comments from people who felt justice had been served.
Others felt she was another victim of domestic violence and criticised the severity of the sentence.
"She's going to serve more time than others who have robbed or raped or killed, when she only looked out for her children," tweeted @setaisa. "Shame on this country."