The two year struggle of Barbara Bernhardt of Takoma Park to retain custody of a 3-year-old child is over.

Dallas Juvenile Court Judge Craig Penfole ruled yesterday that Bernhardt should be allowed to adopt 3-year-old Deborah Annette Bernhardt who has lived with her for the past 2 1/2 years.

Penfold's ruling, which will end a two year legal struggle according to Bernhardt's lawyer, Charles Robertson, came largely as a result of a consent granted by the Dallas County Child Welfare Agency, which had originally placed Deborah with Mrs. Bernhardt two years ago.

The agency also agreed to skip the legal step before adoption - granting custody pending adoption - so yesterday's ruling by Penfold was final.

"This is just the most marvelous feeling in the world," Bernardt said when reached by telephone shortly after the hearing. "I just feel so relieved and grateful to everybody who's helped us along the way.

"Ever since my lawyers told me Thursday that this might happen I've been in a completely euphoric state. It's just such a relief, I can't even explain it."

Deborah has been the subject of a legal tug-of-war since July 1976 when the Dallas Agency and the Lutheran Social Services of the National Capitol Area, which had helped place Deborah, tried to remove her from the Bernhardt home.

Bernhardt fought the move in the Maryland courts but was ordered last Aug. 18 by the Maryland Court of Appeals to relinquish custody of the baby.

According to testimony from the original court case, the Texas agency wanted Deborah removed partly because Bernhardt is now divorced and Deborah's natural mother wanted her in a home with both a mother and father. Lutheran Social Services also charged in court that Bernhardt had concealed the fact that she and her husband were separated shortly after Deborah was placed in their home for a trial period in March 1976.

Penfold ruled on Sept. 18 that he had the authority to hear the case in spite of the Maryland rulings since the Dallas agency had legal custody of the child.

At that point Robertson, Bernhardt's lawyer, set out to try and convince the Dallas agency that it should allow Bernhardt to adopt Deborah.

"I think the main reason they changed their mind was that we got their own psychologist to examine the case," Robertson said. "His credibility is absolutely unquestionable and when he recommended that she stay with Mrs. Bernhardt that was the key.

"What I think happened in this case is that Mrs. Bernhardt was the victim of administrative tyranny. Things just got to the point where everyone had forgotten that there were real people involved in this. The judge finally brought it back down to the level of figuring out what's best for the little girl."

Robertson said Penfold's ruling takes precedence over the Maryland rulings since it was the Texas agency that had legal custody of the child.

Bernhardt has two other children, 6-year-old David and 5-year-old Daniel, who is also adopted. She took all three children to Dallas in September when Penfold ruled on whether to hear the case, but could not afford to take them on her current trip.

"When I get home tonight we're going to have a real live celebration," she said. "There's no way I can feel tired right now. I'm too excited."