A Fairfax County teenager who left her newborn daughter in the bathroom of an Arlington church last month, touching off a five-day search for the mother, has been allowed to keep her baby, her lawyer said yesterday.

The baby, baptized Mary Agnes within minutes after she was discovered at St. Agnes Catholic Church, went home with her 17-year-old mother last week, said lawyer William G. McMurtrie.

"She's doing wonderfully," McMurtrie said. "The baby's thriving. They've got a little nursery. The grandparents are just as happy as they can be."

McMurtrie said that officials at Arlington Child Protective Services, who had placed the baby in a foster home while investigating the case, allowed his client to take her daughter home on the condition that she take a parenting class.

The decision to let the teenager keep her baby came after Arlington authorities announced that they would not file charges against her in the June 11 incident.

Mary Craig, an assistant county attorney, said that all Child Protective Services files are confidential and that therefore she could not comment on cases.

Generally, in cases where a child has been in foster care, the county retains legal custody when the child is returned to the home, officials said. The situation is monitored carefully while services are offered to the birth parents, including therapy, parenting classes and an assigned social worker, they said.

The Rev. James R. Gould, the pastor at St. Agnes who became a central figure in the saga, was on hand for the homecoming last week and pronounced the baby "cute as a bug."

"In my mind, I said this is not only going to be a happy ending, it's going to be a blessed ending," Gould said yesterday.

The teenager, who is a high school student and a member of St. Agnes, maintains that she did not abandon her baby that day, but merely left her in the bathroom while she went to look for Gould to get his advice on how to tell her parents about the birth.

Because it was hot outside that day, she said, she placed the child in the cool basement bathroom. When someone else at the church discovered the baby only a few minutes later, she was too frightened to acknowledge that the child was hers, she said. Police said they learned the mother's identity five days later through a tip.

The teenager, who agreed to an interview four weeks ago on the condition she not be identified, said she told no one about her pregnancy and gave birth by herself in her bedroom. She plans to raise her daughter as Mary Agnes.

Gould said his church was profoundly affected by the case, and he plans to announce in the church bulletin that Mary Agnes has gone home.

Said Gould: "Now we hope the extraordinary will become the ordinary."