U.S. District Court Judge Louis F. Oberdorfer has awarded legal fees of $4.2 million--the bulk of it to an Arlington law firm--for suing Lockheed Aircraft Corp. on behalf of 51 infant survivors of a 1975 U.S. military airplane crash in Vietnam.

The fees, set by Oberdorfer this week, represent 24 percent of a $17.5 million settlement paid to the survivors by Lockheed. Most of the legal fees went to the firm of Lewis, Wilson, Jones & Lewis in Arlington.

Oberdorfer said he could have awarded a fee as high as $6.9 million under existing precedents but took into consideration the fact that an undisclosed portion of the $17.5 million settlement is being funded by the U.S. government, which is limited by law to paying legal fees of no more than 25 percent of any settlement.

The Lewis firm sued Lockheed after the California company's C-5A military transport crashed on April 5, 1975, near Saigon.

As part of what was called "Operation Babylift," the plane had been carrying 226 Vietnamese orphans who were to be resettled in the United States in the last hectic months before the Communist takeover of South Vietnam.

The suit was filed on behalf of the 150 infants who survived, claiming they suffered brain damage because they were deprived of oxygen when a door in the transport plane blew out just before the crash.

Although no permanent injuries were observed initially, the children's adoptive American parents began to notice that many could not stop crying for long spells, could not sit still, and could not concentrate on school lessons for more than a few minutes.

After 163 court hearings, 500 depositions, 12 trials, and numerous appeals, Lockheed agreed last August to settle the case involving the orphans living in this country.

The remaining cases involving orphans living in other countries are being handled separately.

In reviewing the issue of legal fees, Oberdorfer said he originally expected that determining the medical facts in the cases would be relatively simple, since two or three of the orphans could be used as typical examples.

"Contrary to this expectation," he wrote, " . . . there erupted one of the most protracted, costly, and unpleasant litigations in the history of this district.

"Each trial had a full life of its own," the judge complained. On the eve of the first trial, he said, he faced a motion from Lockheed to disqualify himself because his wife's sister had adopted two Asian children.

Focusing on the amount of the fees, Oberdorfer noted that the court-appointed guardian initially told the parents that the Lewis firm would ask for the standard fee in such cases--a third of any amount recovered, nothing if no money is obtained.

In pursuing the cases, the Lewis firm worked with two other law firms, Berkowitz, Lefkowitz & Patrick of Birmingham, Ala., and Cohen & Cohen of Boulder, Colo. It also hired a full-time doctor.

Oberdorfer said the Lewis firm, founded by the late U.S. District Court Judge Oren R. Lewis, was "sometimes disorganized and ill-prepared." He called arguments by Oren R. Lewis Jr., a son of the late judge, "often more inflammatory than analytical." Still, he said the firm was innovative and persuasive to jurors, performing "brilliantly" on legal issues.

Overall, he said, their efforts were "tireless" and "highly professional."

Charles W. Work, the court-appointed guardian for the children, said yesterday, "Oren Lewis Jr. did a truly outstanding job against overwhelming odds. We were fighting Lockheed, which had tons of lawyers, and the federal government, which has tons of lawyers, and Oren Lewis perservered."

Lewis had no comment.