Yesterday's violence at the District Building, Washington's city Hall, was random, confused and deadly. Two unidentified, armed black men killed a radio reporter and wounded Councilman Marion Barry and three other victims.

At nightfall the men were holding an undetermined, small number of hostages in the fifth floor office of Council President Sterling Tucker, but they had not made specific demands. One of the gunmen told a Washington Post reporter by telephone he would trade three female hostages for Mayor Walter Washington.

None of the available evidence connected the District Building gunmen to the Hanafi Muslims holding hostages at B'nai B'rith offices near Scott Circle and at the Moslem mosque on Embassy Row.

A police officer on the scene said the two men were "very angry, but we don't know what they're angry about."

Neither police nor witnesses could reconstruct what happened at the District Building. They agreed the armed men arrived about 2:40 p.m. and proceeded to the fifth floor, where the mayor's office, Council chambers and Council members' offices are located.

Moments later an aide to Councilman John Wilson ran down the carridor onto which Council offices open, shouting that men with guns were in the building and that some people were lying on the floor near Tucker's office.Hearing that, several councilmen and their staffs locked themselves in offices.

Moments later, guns were fired. Apparently the first volley struck Barry, who said he was walking down the main corridor toward the Council offices when "I saw some activity down at the end of the hall."

Suddenly Barry heard two shots and dived to the right side of the hall, he said. "And then I felt a hot, burning sensation in my chest. I knew I'd been shot."

Barry staggered into the Council chamber where he waited 10 minutes by one estimate, 20 or 25 by his own, for an ambulance. He had been wounded just above the heart, escaping death by inches. He was recovering satisfactorily after emergency surgery last night.

While Barry, 41, waited for an ambulance, an elevator arrived on the fifth floor carrying two newsmen, Maurice Williams of WHUR-FM and Stephen Colter of the Washington Afro-American.

When they got off the elevator, Colter said in an interview they saw two security guards inching toward the large double doors to the Council offices. When the doors opened, Colter recounted, he heard a shotgun blast and saw Williams and one of the guards, Mark Wesley Cantell, 51, fall to the ground.

"I saw Williams turn around, and he said "I've been shot,'" Colter said. Colter then ran into a room off the main corridor and waited several minutes.

"I began to holler, 'Maurice, Maurice, if you can hear me say so.' He said nothing." After a while Colter went into the hallway to see how Williams was. "I felt his pulse and I couldn't feel anything." Williams, 22, was dead on arrival at the hospital.

Neither Barry nor Colter saw a gunman, nor had any idea why the men were shooting.

Police reported shortly before 9 p.m. last night that an unidentified victim had been wounded in the District Building and was presumed dead.

According to a spokesman at George Washington Hospital, a fifth man also was critically wounded in the District Building. The hospital identified him as Robert Pierce, 51, of 5100 38th St. NW. He was undergoing surgery last night. Police said they did not know who he was, why he was in the shot.

A City Council aide said later Pierce was an intern in the office of Councilman David A. Clarke. A retired foreign service officer, Pierce recently began to study at the Antioch School of Law. He was working at the District Building as part of internship for his law degree, according to neighbors.

Pierce has a wife, two sons and a daughter, neighbors said.

After the shooting began, Mayor Washington and numerous other city officials barricaded themselves in their offices. Two hours after the first shooting an official in the mayor's office said he didn't know what was going on.

At dusk police escorted the mayor and his staff from his wing of the District Building's fifth floor, on the opposite end of the building from the Council's offices. Police said the mayor proceeded to the city's civil disturbance command post at police headquarters, 300 Indiana Ave. NW.

The only known contact between the gunmen and the outside world came at 4:55 p.m., when a Washington Post reporter called the number of Tucker's office. The number had been busy for a long time.

A man answered. The Post reporter identified himself and asked who the gunman was and what his group was.

The man answered: "We want the mayor. We're going to give three women for the mayor."

The reporter asked how many hostages were being held, and how many were in his group, but he said only, "That's all, that's all we got to say." The man, who sounded tense, hung up.

Later a policeman answered the same line, apparently on an extension phone in the reception area outside Tucker's office. By 6:30 p.m. the number rang endlesly without anyone answering it.

Reporters found one other witness who saw the gunmen, Theodore Wade, a District Building elevator operator. Wade said he opened his elevator's doors and saw a man with a shotgun. "When he pointed the shotgun at me I pushed the gun up and closed the door on him," Wade said. "I said, 'my God, it's just like on TV.'"

Apart from the unknown number of hostages the gunmen held in Tucker's office, numerous Council employees were forced to hide behind locked doors in their offices throughout the afternoon and evening. They were afraid to move, not knowing where the gunmen were or whether they were watching the corridors.

A woman in the office of Councilman Douglas Moore, who declined to identify herself said by telephone she could overhear the gunmen and police exchanging information of some kind, but she could not make out what it was. She was still here at 7:30 p.m., with a other women employee.

Barry Campbell, assistant to Councilman Arrington Dixon, said by phone that he, Dixon and a secretary were barricaded in Dixon's office. Campbell said they twice heard shots fired and glass breaking. Once the shots sounded like several rounds from a machine gun, he said. After 6 p.m. Campbell did not answer his phone.

Apparently Dixon was the only Council member trapped in his office by the gunmen. Several others were out of the building at the time. Councilwoman Willie J. Hardy. who was at a meeting away from the District Building, said she fainted on 13th Street outside after hearing what was going on.

The District Building is normally protected by only a few guards, according ot employees. Mrs. Hobart Rowen, a volunteer in the citizen's complaint office, said it was common for the one regularly-manned guard post at one of the three main entrances to be left vacant while the guard ran an errand in the building. The other two entrances were once manned by guards but no longer are, Mrs. Rowen said.

Mayor Washington has a guard and tighter security outside his office.

Williams regularly covered city hall for WHUR-FM news. A recent Howard University graduate, he was assigned to the District government beat late last fall.

Colleagues described him as young, serious about his work, relatively softspoken, talkative and good-humored.

WHUR-FM is a commercial station owned by Howard University. It has built a large listening audience with musical programming emphasizing jazz and soul music and a substantial local news staff.