Harvey Petway, who had once been convicted of raping his 13-year-old daughter, walked out of D.C. Superior Court a free man yesterday after a jury acquitted him in a second trial of the case.

Petway, sentenced two years ago to 10 to 30 years in prison by Judge Nicholas S. Nunzio, appealed the conviction on the grounds that the judge had repeatedly interfered in the case during the first trial.

The appeals court found that Nunzio's conduct "substantially prejudiced" Petway's defense, reversed the conviction and ordered a new trial.

Nunzio, who was sternly reprimanded for his conduct in the Petway case, refused to comment on yesterday's verdict. The D.C. Court of Appeals has also criticized Nunzio's behavior in two other cases within the last seven months, and last December he was censured by the city's judicial tenure commission.

Some of Petway's relatives began weeping in the courtroom yesterday when the jury returned after deliberating for three hours and announced that Petway was "not guilty."

Petway himself showed no emotions as he stood to relieve the verdict. He later smiled, then cried as presiding Judge Sylvia Bacon polled each juror for their individual decisions. The judge finally said, "Mr. Petway, you're free to go."

Petway was charged with carnal knowledge and incest in connection with the assault of his 13-year-old daughter on the morning of Aug. 22, 1976, as she was on her way to Sunday school.

A week after the alleged assault, Angela Petway, 29, the girl's mother and Petway's estranged wife, recruited two men and went to Petway's house to kill him in retaliation for the incident.

Two men were killed and two others injured in the shooting spree that resulted, although Harvey Petway escaped unharmed. Angela Petway later pleaded guilty to one count of second degree murder and is now serving four to 20 years in prison.

The daughter testified -- at both trials -- that her father and several of his friends had dragged her into the basement of an abandoned house at 824 G St. NE and then sexually assaulted her.

The key to yesterday's verdict, prosecutors and defense lawyers agree, was the testimony of several new witnesses who cast doubt on the daughter's truthfulness.

The most compelling witness, and the most damaging to the governmenths case, was Dr. Linda J. Whitby, a staff physician at D.C. General Hospital, who said she had examined the daughter "from head to toe" shortly after the alleged assault and found "no evidence of recent violence."

Another witness, Lillian Green, who operated a home for girls from broken homes, testified that while the daughter lived there last year she gained a reputation for "not telling the truth."

Government prosecutors said yesterday they were "not very happy" with the outcome of the case, which they said had been unusually hard to prosecute in the second trial.

Assistant U.S. Attorney John Hume, chief of the felony trial section of D.C. Superior Court, said that when felony convictions are overturned by the Court of Appeals, they can be "extremely difficult to the prosecute the second time around."

"If the case has been to trial once the defense already knows what the government's case is and they can tailor a defense case against ours," Hume said. "In a number of instances we have had to dismiss cases overturned by the court of appeals."

In some of those instances, Hume said, the government's evidence has been lost through the lapse of time. In other cases, witnesses have refused to go though the ordeal of testifying a second time, he said.

In the Petway case, Hume said that the difference in the daughter's appearance between the first trial two years ago and the current trial posed a major problem for Assistant U.S. Attorney E. Thomas Roberts, who prosecuted the case for the government.

The daughter "had changed dramatically physically from a small girl two years ago to a tall, fully developed woman," Hume said. "It was difficult to get the jury to imagine what she looked like when she was 13."

Outside the courtroom yesterday, tears rolled down Petway's cheeks as he and members of his family embraced his court-appointed attorneys, Philip L. Kellogg, James L. Lyons and Edwin A. Williams.

"You believed in us when everybody else said Harvey was guilty," Ernestine Petway, Harvey Petway's sister-in-law, told the lawyers.

"We believe justice was served in this case," said Williams, who presented Petway's defense in the second trial. "We had an impartial judge and a jury that was alert and astute and willing to pay attention to all of the evidence."