MADRID — A Spanish woman was sentenced on Friday to five years in prison on charges of abducting her two children during a custody battle in which she accused her partner of abuse, a case that has gripped the country and raised questions about equitable treatment in the courts.

A judge in Granada found that the woman, Juana Rivas, ignored summonses to appear in court when she went into hiding with her children for a month in 2017.

The judge also revoked Ms. Rivas’s parental rights for six years and ordered her to pay 30,000 euros to her former partner, Francesco Arcuri, an Italian who is the father of their two children, now 12 and 4.

José Estanislao López Gutiérrez, a lawyer for Ms. Rivas, said on Friday that his client would appeal the ruling, which he said was “tremendously unjust.”