Updated

The Cleveland man accused of holding three women captive in his home for about a decade agreed to plead guilty in a deal to avoid the death penalty.

In exchange, prosecutors said 53-year-old Ariel Castro would be sentenced to life without parole plus 1,000 years.

A judge accepted the pleas and declared Castro guilty. Sentencing is Aug. 1.

Castro had been charged in a 977-count indictment. He had been scheduled for trial Aug. 5 on allegations that include repeatedly restraining the women and punching and starving one woman until she had a miscarriage. The former school bus driver also was charged with hundreds of counts of kidnapping and rape, plus assault and other counts.

Castro was in court Friday morning to enter the guilty plea. When asked if he understood he would never be released from prison, Castro said: "I do understand that, your honor."

More On This...

He added, "I knew I was pretty much going to get the book thrown at me." Castro appeared in court wearing glasses and answered the judge clearly making eye contact. During an earlier court appearance he had to be repeatedly asked by the judge to keep his head up and eyes open.

The deal comes more than a month after a statement issued on behalf of the women said they were "hopeful for a just and prompt resolution" and had "great faith in the prosecutor's office and the court."

The sticking point on a plea deal had been whether the prosecutor would rule out the death penalty. The Cuyahoga County prosecutor had kept that issue under review.

At one point when asked by the judge if he had any questions, Castro said he wanted to say that he "was a victim as a child and it just kept going," before being cut off. He also said "my addiction to pornography and my sexual problem has really taken a toll on my mind."

The women disappeared separately between 2002 and 2004, when they were 14, 16 and 20 years old. Each said they had accepted a ride from Castro, who remained friends with the family of one of the women and even attended vigis over the years marking her disappearance.

Castro is accused of repeatedly restraining the women, sometimes chaining them to a pole in a basement, to a bedroom heater or inside a van. The charges alleged Castro assaulted one woman with a vacuum cord around her neck when she tried to escape.

The women escaped Castro's house May 6 when one of them kicked out part of a door and called to neighbors for help. Castro was arrested within hours.

News that Amanda Berry, Gina Dejesus and Michelle Knight had been found alive electrified the Cleveland area, where two of them were household names after years of searches, publicity and vigils. But elation soon turned to shock as allegations about their treatment began to emerge.

Castro fathered a 6-year-old daughter with Berry, authorities said. They allege that on the day the child was born, Christmas 2006, Castro raped one of the other women, who had helped deliver the baby.

Berry told authorities that she, her child and the other women never saw a doctor during their captivity.

Knight said her five pregnancies ended after Castro starved and repeatedly punched her.

There are plans for the house to be demolished.

The Associated Press does not usually identify people who may be victims of sexual assault, but the names of the three women were widely circulated after they disappeared, and they appeared in an online video thanking the public for its support. They otherwise have sought to stay out of sight and have appealed for privacy.

Click for more from Fox8.com.

The Associated Press contributed to this report.