TULSA, Okla. -- An ex-janitor at a 17,000-member Tulsa megachurch pleaded guilty Friday to making a lewd proposal to a 14-year-old girl, less than a week before his trial was set to begin.

Israel Castillo, an ex-janitor at the 600-employee Victory Christian Center in south Tulsa, pleaded guilty to a charge alleging he sent lewd Facebook messages to a 14-year-old girl. Up until Friday, Castillo had repeatedly pleaded not guilty, saying that he didn't know the girl who received the messages was underage – a claim refuted by prosecutors.

Castillo's case was part of a scandal involving the megachurch that broke last summer. Five Victory employees – including the son and daughter-in-law of ministry co-founder and head pastor Sharon Daugherty – were charged with waiting two weeks to report the rape of a 13-year-old girl to authorities. Another ex-janitor, Chris Denman, was sentenced to 55 years in prison last December for the 13-year-old's rape in a ministry stairwell and other sex crimes.

A barely-audible Castillo acknowledged to the judge during Friday's hearing that he was making the plea without any pre-arranged agreement with prosecutors or the judge. Castillo's trial was set to begin Tuesday.

Tulsa District Judge William Kellough accepted the plea and set sentencing for Oct. 18. Castillo, who has been free on bond pending trial, faces up to 20 years in prison, and Kellough ordered that the 24-year-old be immediately taken into custody.

"We are pleased the victim didn't have to go through a jury trial," said Sarah McAmis, director of the Crimes Against Children Division at the district attorney's office. McAmis said she plans to ask the court to sentence Castillo to prison time.

Hugh Hood, Castillo's defense attorney, said his client never had physical contact with the girl and hasn't had inappropriate contact with anyone.

"He recognizes that these communications should not have taken place and that he, as an adult, exercised poor judgment," Hood said. "He understands that, regardless of the sentence imposed by the court, a plea to this allegation will require that he register as a sex offender probably for the rest of life."

Sharon Daugherty, whose sermons are beamed to 200 countries from the ministry's south Tulsa location, declined to comment on Castillo's plea Friday.

Last month, Daugherty told The Associated Press that the church was learning from the past and "continually looking ahead for ways in which we can better serve our community and our members."

Besides the Castillo sentencing in October, the only piece remaining in the Victory scandal is a civil claim brought last September by the mother of the 13-year-old rape victim. The mother alleges the church was more worried about damage control than the well-being of her daughter – an argument the ministry denies. That case is set for a January jury trial.

Last month, the ministry said it had reached out to two state agencies to help update its child abuse and neglect manual and ramped up security measures across its sprawling campus in the year since the rape – part of a series of enhancements and policy overhauls it said it has made.

Victory leaders plan to go into greater detail to explain the changes to the public after the civil case is settled, church spokesman Justin Johnson said Friday.

Earlier on HuffPost:

Loading Slideshow...
  • Victory Christian Center is shown on Wednesday, Sept. 19, 2012 in Tulsa, Okla. Five employees at the center face criminal charges for waiting more than two weeks to report the alleged rape of a 13-year-old girl on the south Tulsa campus. (AP Photo/Justin Juozapavicius)

  • Victory Christian Center is shown on Wednesday, Sept. 19, 2012 in Tulsa, Okla. Five employees at the center face criminal charges for waiting more than two weeks to report the alleged rape of a 13-year-old girl on the south Tulsa campus. (AP Photo/Justin Juozapavicius)

  • This handout photo provided by the Tulsa County Sheriff's Office shows John Daugherty. Daugherty is among five ministry employees of Victory Christian Center, in Tulsa, Okla., who have been charged by authorities for waiting two weeks before reporting to police the alleged rape of the 13-year-old. Police say the girl is among at least three victims of alleged sex crimes by two former church employees who face criminal charges. Investigators say more could surface. (AP Photo/Tulsa County Sheriff's Office)

  • This handout photo provided by the Tulsa County Sheriff's Office shows Anna George. George is among five ministry employees of Victory Christian Center, in Tulsa, Okla., who have been charged by authorities for waiting two weeks before reporting to police the alleged rape of the 13-year-old. Police say the girl is among at least three victims of alleged sex crimes by two former church employees who face criminal charges. Investigators say more could surface. (AP Photo/Tulsa County Sheriff's Office)

  • This handout photo provided by the Tulsa County Sheriff's Office shows Charica Daugherty. Daugherty is among five ministry employees of Victory Christian Center, in Tulsa, Okla., who have been charged by authorities for waiting two weeks before reporting to police the alleged rape of the 13-year-old. Police say the girl is among at least three victims of alleged sex crimes by two former church employees who face criminal charges. Investigators say more could surface. (AP Photo/Tulsa County Sheriff's Office)

  • This handout photo provided by the Tulsa County Sheriff's Office shows Chris Denman. Denman was arrested Sept. 5 for allegedly raping a 13-year-old girl at Victory Christian Center in Tulsa, Okla. Five ministry employees of the megachurch have been charged by authorities for waiting two weeks before reporting to police the alleged rape. Police say the girl is among at least three victims of alleged sex crimes by two former church employees. (AP Photo/Tulsa County Sheriff's Office)

  • This handout photo provided by the Tulsa County Sheriff's Office shows Harold Sullivan. Sullivan is among five ministry employees of Victory Christian Center, in Tulsa, Okla., who have been charged by authorities for waiting two weeks before reporting to police the alleged rape of the 13-year-old. Police say the girl is among at least three victims of alleged sex crimes by two former church employees who face criminal charges. Investigators say more could surface. (AP Photo/Tulsa County Sheriff's Office)

  • This handout photo provided by the Tulsa County Sheriff's Office shows Israel Shalom Castillo. Castillo was arrested Thursday morning after turning himself in at the Tulsa, Okla. jail. He is charged with making a lewd proposal to a child and using a computer to commit a sex crime. Five ministry employees of Victory Christian Center, in Tulsa, Okla. have been charged by authorities for waiting two weeks before reporting to police the alleged rape of the 13-year-old. Police say the girl is among at least three victims of alleged sex crimes by two former church employees. (AP Photo/Tulsa County Sheriff's Office)

  • This handout photo provided by the Tulsa County Sheriff's Office shows Paul Willemstein. Willemstein is among five ministry employees of Victory Christian Center, in Tulsa, Okla., who have been charged by authorities for waiting two weeks before reporting to police the alleged rape of the 13-year-old. Police say the girl is among at least three victims of alleged sex crimes by two former church employees who face criminal charges. Investigators say more could surface. (AP Photo/Tulsa County Sheriff's Office)

  • Victory Christian Center is shown on Wednesday, Sept. 19, 2012 in Tulsa, Okla. Five employees at the center face criminal charges for waiting more than two weeks to report the alleged rape of a 13-year-old girl on the south Tulsa campus. (AP Photo/Justin Juozapavicius)