A D.C. Superior Court judge was shot and critically wounded last night when he resisted a pair of robbers who confronted him outside his high-rise apartment house in Southwest.

Judge Frank E. Schwelb, 47, who has been hearing small claims cases since he began sitting on the bench in December, was shot once in the abdomen about 10:15 p.m. outside Capitol Park Towers, at 101 G St. SW.

As his assailants fled into the darkness, Schwelb, clutching his bleeding side, staggered into the lobby of the building. Security guards drove him to George Washington University Hospital, where emergency surgery was completed early this morning.

The shooting occurred shortly after Schwelb had parked his car on a circle at Delaware Avenue and H Street, on the edge of the Capitol Park Towers complex.

He began walking the two long blocks through the complex toward his building. The area, in the words of one police official, is "an average street area," well lighted, but "quiet," with little late-hour pedestrian traffic.

Suddenly, two men in their 20s, one armed with a small pistol, approached and demanded his money. Schwelb refused to surrender it, he told the security guards, and the man with the pistol shot him.

The bullet entered the upper left section of the judge's stomach, then tore downward through his body and lodged near his pelvis.

As the wounded jurist staggered into the building, the receptionist telephoned for a fire department ambulance.

Ambulance dispatchers got the receptionist's call about 10:28 p.m., but the hurried initial report gave them the wrong address, they said.

While the ambulance crew was trying to find the building, Twanna Kilgore, a receptionist at another building in the Capitol Park complex, sent the two security guards to the scene.

The guards, Francis Butler and Anthony Brown, took Schwelb to the hospital in a private van. He never lost consciousness during the three-mile ride.

Meanwhile, the police radio crackled with calls as uniformed officers and teams of detectives rushed into the area.

Schwelb, a bespectacled man who wears a mustache and is fond of Gilbert and Sullivan, has during his brief tenture on the bench already distinguished himself for the clarity and trenchant wit of his opinions.

In addition, the former Justice Department official has established a reputation for diligence -- based in part on his 75-hour work-weeks -- and for a particular concern for the everyday citizens who come before him for adjudication of the small disputes of everyday life.

A native of Prague, Czechoslovakia, and a naturalized citizen, Schwelb is believed the first jurist to be wounded here in a street attack.

Authorities said there was no indication that the shooting was connnected to Schwelb's judicial duties.

When nominated last September by President Carter to serve as one of the 44 judges of the Superior Court, Schwelb was serving as chief of the housing section in the Justice Department's civil rights division.

During his 10 years in that position, Schwelb won a national reputation for the enforcement of fair housing laws.

A graduate of Yale College and the Harvard Law School, Schwelb was admitted to the bar in New York City in 1958, and after four years in private practice, joined the civil rights division of the Justice Department in 1962.

In 1967 the Federal Bar Association named the bachelor attorney its Younger Federal Lawyer of the Year.

Early this morning police were conducting interviews with several persons believed to have seen or heard part of the shooting incident. They were also combing the area around the high-rise for possible evidence and for other witnesses.

However, investigators said that until they could interview the victim, their best account of the incident remained the sketchy description schwelb gave the guards in the van on the way to the hospital.

No arrests had been made by early this morning.