A Northwest Washington man faces a possible sentence of life in prison after pleading guilty yesterday to charges of murder and armed robbery in the slaying last year of a bank teller during a holdup three blocks from D.C. police headquarters.

William Oliver Hughes Jr., 26, appeared before D.C. Superior Court Chief Judge H. Carl Moultrie I and in a calm, deliberate voice admitted shooting National Bank of Washington teller Sonya Grillo Durham last Sept. 23 after ordering her to fill a bag with money.

Hughes told Moultrie, however, that "the gun accidentally went off. I didn't see Miss Durham. I wouldn't have shot her."

Hughes, who fled the city after robbing the bank of $15,000 and later surrendered to FBI agents in New Orleans, faces minimum terms of 20 years for first-degree murder while armed and 15 years for armed robbery. Both charges carry maximum life sentences. Moultrie ordered Hughes held without bond pending sentencing June 17.

Raphael Grillo, Durham's brother, said after yesterday's proceding, "We're all just glad it's over." Durham's cousin, D.C. police Capt. Nelson Grillo, also was in the audience, but declined comment.

Some employes of the bank at 301 Seventh Street NW broke into sobs as they left the courtroom. "I really can't think of anything to say," said one, as she wiped away tears.

Hughes told Moultrie he had decided to plead guilty to the charges rather than go to trial because of the substantial government evidence against him. According to Assistant U.S. Attorney David S. Krakoff, who outlined in court yesterday what the government would have proved had the case gone to trial, Hughes had been identified by 14 people who were in the bank at the time of the robbery or later viewed films of the incident recorded by security cameras.

According to Krakoff, Hughes had been going to the bank regularly to cash his pay checks from the George Hyman Construction Co. Hughes worked his last day for the company one week before the incident.

Hughes appeared at the bank shortly after it opened that morning. He approached one teller's window but was turned away and admonished for cutting in line, Krakoff said. Moments later he walked to Durham's window, pulled a handgun and announced a robbery.

Krakoff said Hughes threw Durham a bag and ordered her to fill it with money. Before she could do so, Krakoff said, Hughes raised his revolver and fired, shooting the 36-year-old teller once in the head. Durham died at George Washington University Hospital 2 1/2 hours later.

Hughes then demanded cash from six other tellers. Before leaving the bank, according to Krakoff, Hughes turned at the door and said: "Thank you very much, ladies and gentlemen, for your cooperation. I love you."

Outside the bank, Hughes commandeered a taxi and ordered the driver at gunpoint to take him to Fifth and Ridge streets NW, where he disembarked. He later took a train to New York and from there a flight to New Orleans, Krakoff said.

There, according to Krakoff, Hughes called a local television station and said he wanted to surrender. The FBI arrested him Sept. 26 at a bar in the French Quarter.

According to Krakoff, Hughes gave the FBI a full account of the incident, plus a diagram of the bank's interior.

"I know that I had committed a terrible offense and I wanted to be brought to justice," Hughes told Moultrie. "Because I know that justice must be done."

The money and the gun used in the incident have not been recovered, authorities said.