SALEM, Mass. — A woman accused of kidnapping and assaulting a toddler she used to babysit has pleaded guilty.

Abigail Hanna pleaded guilty on Friday to kidnapping, assault and battery and other charges and was sentenced to five to seven years in prison, followed by 10 years of probation. The 22-year-old Hanna tearfully apologized in court.

Prosecutors say Hanna, of Topsfield, had babysat the 2-year-old girl before her parents fired her for being unreliable. Hanna acknowledged taking the girl in the middle of the night from her home in Hamilton last November.

The child was found several hours later in Rowley by the side of the road, naked, with a shaved head and abrasions and burn marks on her body.

This story has been corrected to show that the child was taken from her home in Hamilton, not Rowley, and found in Rowley, not Hamilton.