A 34-year-old man pleaded guilty yesterday to aggravated sexual battery, admitting that he had sex with a 12-year-old Dumfries girl who gave birth to their child and then left the baby in an outdoor trash can.

Gregory Dion Wilkins, of Triangle, pleaded guilty in Prince William County Circuit Court, more than nine months after the baby was born. Wilkins had originally been charged with rape, but prosecutors agreed to the lesser charge of aggravated sexual battery so that the girl, now 13, would not have to testify in a trial.

Judge Richard B. Potter, who accepted the plea, will decide on a sentence for Wilkins at a hearing in February. Wilkins could get a maximum sentence of 20 years in prison and be fined $100,000. Had he been convicted of rape, he would have faced the possibility of life in prison.

According to police, the girl gave birth to a healthy baby girl on Feb. 15 after concealing the pregnancy from her family and friends. She allegedly wrapped the baby in a plastic grocery bag and placed her in the family's garbage can. Neighbors found the baby about four hours later when they heard a rustling noise in the trash can and kicked it over.

Police initially arrested another man for having sex with the girl, but he was exonerated by DNA evidence. The girl later told police and prosecutors that she was having sex with several men who could have fathered the baby.

The Washington Post generally does not identify alleged victims of sex crimes.

Wilkins, who was arrested in late July, told police that he was not having sex with the girl and provided blood samples for testing. DNA and other chemical analysis indicated he was the father of the child.

"He is remorseful about having sex with her and he's very concerned about the future of the baby," said Blake Woloson, Wilkins's attorney. "It was a consensual relationship."

The teenage girl and her sister used to babysit for Wilkins's young children, the girl's father said in July. Wilkins and his wife were "very close" family friends for several years, the father said.

Wilkins lives in a town house with his wife and children in the Point of Dumfries community just east of Route 1, and he will be held in jail without bond until his sentencing. Woloson said Wilkins has never seen the baby but has indicated he intends to help support the child.

The baby, now 9 months old, is in the custody of the county's Department of Social Services, but the teenager's family has visited her. The family is attempting to get custody of the child, and a hearing is scheduled for this afternoon that could place her with the family within months.

Prosecutors said they do not plan to charge the girl or her parents in connection with the incident. Assistant Commonwealth's Attorney Sandra Sylvester said she agreed to the plea arrangement to spare the girl from having to testify in public.

"A trial, given this young lady's propensity for credibility problems, would essentially put her on trial," Sylvester told the court.