An Ankeny man kidnapped a woman's toddler, then told her he was going to kill the child and leave her body in a cornfield, police said.

Cato Gephart, 22, was arrested early Tuesday and charged with first degree harassment, second degree kidnapping and child endangerment after a woman told police that Gephart took her 18-month-old daughter from her Ankeny home.

He texted the mother, "I'm going to kill ya," after leaving with the child, according to a criminal complaint. He also told the woman he was going to "dump (the child's) body in a cornfield."

Police contacted Gephart who eventually agreed to return to the home with the child. There, he led police on a foot chase though yards near Northeast Trilein Drive late Monday night, court records show. He was detained after officials shocked him with a stun gun.

Gephart later admitted to police that he did send the woman text messages and threatened to kill himself, the woman and her child, according to a criminal complaint.

No attorney for Gephart was listed in court records as of Tuesday morning.

Anna Spoerre covers crime and courts for the Des Moines Register. She can be contacted at aspoerre@dmreg.com, 515-284-8387 or on Twitter at @annaspoerre.

Your subscription makes work like this possible. Subscribe today at DesMoinesRegister.com/Deal.