Racing a deadline less than 30 hours away, Barbara Bernhardt, with three youngsters in tow, boarded a plane for Dallas Thursday to make one final bid to keep the 3-year-old girl she has been trying to adopt since 1976.

As she got on the plane at National Airport Bernhardt knew that she was under court order to return little Deborah Annette to a Washington adoption agency at 10 a.m. yesterday. That agency represents officials in Deborah's native Texas, who hold legal custody of the child.

When Bernhardt left Washington she was under a court order to return little Deborah Annette to a Washington adoption agency at 10 a.m. yesterday so the child could be placed with a foster home. The agency, representing officials in Deborah's native Texas, wanted to remove the child from Bernhardt's Takoma Park home partly because she concealed from social workers the face that she and her husband were separated shortly after Deborah came to live with them in March 1976.

But by Friday night, through the efforts of a Dallas lawyer, a Texas judge, family friends and Bernhardt's ex-husband, Bernhardt had won a court order to stave off Deborah's removal from her home and a new chance to fight for adoption.

"I really had nothing to lose," Bernhardt recalled yesterday of her sudden decision to fly to Dallas last week. "I had two working days and I had to try."

Though her lawyers advised against it and friends said it was crazy to go without any appointments, Bernhardt, her two sons, Deborah and family friend Jayetta Hecker boarded a flight Thursday morning and arrived in Dallas armed with list of people to call.

On Thursday afternoon they got to see a judge, only to be told, "What, you have no (legal) motions, no lawyer? I can't talk with you," according to Bernhardt. In a courthouse office, Hecker got on the phone and somehow came up with the name of Charles Robertson, a Dallas lawyer who had helped write the state's family laws.

Robertson saw them, and Thursday night read the legal papers that took him through Bernhardt's two-year adoption quest in Maryland. She had fought the case all the way to Maryland's highest court and lost.

"I thought she had a meritorious case," Robertson explained by phone yesterday. "Through it all, no one has talked about her ability to nurture, to take care of the child." Robertson took the case.

Late Friday, as the Texas District Court building in Dallas had all but emptied for the weekend, a judge signed an order that gave Bernhardt the right to keep Deborah until a new custody hearing can be held this week in Dallas.

The court order, carried by 6-year-old David Bernhardt and his 5-year-old brother Daniel, was rushed by plane back to Dulles International where Bernhardt's ex-husband met the children. A family friend saw to it that the order reached the adoption agency, Lutheran Social Serives of the National Capital area.

Bernhardt stayed in Dallas, where Robertson has lined up a group of psychologists and child experts to interview Bernhardt and Deborah and testify at the court hearing.

Bernhardt said she would have returned to Washington yesterday and turned Deborah over to an Annandal foster family had she failed to get the court order.

Officials of Lutheran Social Services could not be reached for comment yesterday, but in the past the Rev. Raymond Hartzell, the agency director, has said that the Montgomery County Circuit Court "has thoroughly dealt with this (adoption) issue and made it its decision. We must stick by that."

A Circuit Court judge ruled last year that Bernhardt would have to give up Deborah, and Bernhardt's attempts to appeal that ruling in Maryland have failed.