When Mayor Walter E. Washington finally entered his office on the fifth floor of the District Building one day last week, the swearing-in of six members of the Occupational Safety and Health Board was over. The mayor's executive secretary had administered the oath, while the mayor talked next door with members of his cabinet about leaving office after more than a decade as the city's chief executive.

Henry Brock, vice president of the Greater Washington Central Labor Council, which had strongly supported the mayor in his unsuccessful reelection campaign, still lingered from the swearing-in ceremony when Walter Washington entered his office, which overflowed with memorabilia of his 11 years as mayor - plaques, certificates, honorary degrees, ceremonial hats and shovels, and photographs with presidents and the British royal family.

"Henry, how are you?" asked a somewhat subdued Walter Washington, his voice slightly choked by the aftereffects of what he described as a "flu bug."

"Well," said Brock in a lifeless monotone, "I'm still around."

"Me, too," said the mayor, lifting an eyebrow and grunting a laugh in his throat. A few people around them also chuckled and briefly clapped hands. They had gotten the point.

"You can't keep a good man down," Brock said.

Walter Washington was still in city hall. But, for the first time after all those years, his days were numbered.

Although the slow count of the Sept. 12 Democratic primary was continuing at the time, the mayor had clearly lost - in fact, he had finished last behind Marion Barry and Sterling Tucker in results that were confirmed by yesterday's unofficial final count. Shortly after noon on Jan. 2, 1979, the only mayor that the District of Columbia has had in a century will become a private citizen.

It will not be an unceremonial ending of an era. Already, friends of the mayor are contemplating a mammoth testimonals later this year.

Yet, it is not the way he would have wanted to leave. After painfully healing racial wounds and presiding over rebuilding of the city from the ruins of the 1968 riots, after helping turn the one-time crime capital of the country into an inviting boom town, after surviving hostile congressional committees and critics of the way he ran his administration, Walter Washington asked the voters for four more years in office. And the voters said no.

"I begged him not to run last August for a number of reasons," said Flaxie Pinkett, one of Washington's longtime friends and strongest political supporters. "I would have preferred to see him retire . . .

"But I feel very secure about Walter . . . I don't think he'll have any trouble doing anything he wants to do.I don't know what he wants to do. He told me he wanted to be mayor of the city.

"I don't see this upsetting any apple carts. I think now he's gonna be free to look at what else he can do."

The mayor said in an interview last week that this is what he is just now beginning to do, to think about life after city hall. It was an initially uneasy mayor who agreed to talk with a reporter. He first fumbled through stacks of papers on his large glass-topped desk before leaning back in his high-backed blue leather chair and speaking more freely.

Walter Washington has seldom been a pointed and graceful speaker and this day was no different. He is an incessant talker, a rambler, who eventually makes his points amid mixed metaphors, bureaucratic jargon and roundabout inference. On this day, speaking quietly, he seemed to be trying to sort out the days of his life.

"The earlier years were good," he recalled. His "transitional years were in phases." He talked about what he considers his greatest accomplishments, among them his ability, by sacrificing his personal pride and not rocking the boat, to help convince Congress and the White House, as the experimental appointed mayor from 1967 to 1974, that an overwhelmingly black capital city could be granted limited self-rule without falling apart.

Before that, there was a quarter century at the National Capital Housing Authority, the city's public housing agency. "Going through the process of seeing what I saw in housing in terms of dilapidated homes ( and seeing what I see now) is a particularly satisfying thing," Washington said.

When Walter Washington was appointed mayor, six years after his political mentor, John B. Duncan, had become the first black District of Columbia commissioner, most of the city's bureaucracy was run by whites. Now, half the department heads are black.

The reporter reminded Washington of that and he grinned. "Just look at the organization chart," the mayor said.

Are you proud of that?

"Sure I am," he said quickly, his face taking on a sterner look.

It was an acknowledged gamble by Washington to enter the Democratic primary as he did - late in the game, hoping to eke out victory in a close three-way race by running on his record.

But friends insist that Washington was too proud a man, too accustomed to being mayor to turn his chair - his city - over to someone else just when everything appeared to be on the brink of going right.

The mayor said he does not regret his decision to take that chance even though he now leaves office in defeat.

"People are going to run against your record, anyway. You wouldn't have had a chance to talk" in defense of that record if he did not run, he said. Besides, he added, he was still "holding in there at one-third of the vote."

Washington said he is looking forward to having more time for himself. "As you said, being the mayor and the mayor being me has been interchangeable" he said. "Most of my life, I've had to forgo things I wanted to do, forgo the family."

Washington said he would write a book - perhaps even two - about his experiences. "As somebody said to me the other day, there's no single person that has had more impact on this city than I have . . . That's a given (fact) whether you like this program or not."

There was no more time for Washington to talk because city administrator Julian R. Dugas had interrupted, complaining that visitors had come "all the way down here from Philadelphia. So can we get on with the business of government?"

The mayor, becoming visibly uneasy, tried to keep talking. But Dugas was already closing the door behind him, angrily cursing at the reporter.

For many of those around Walter Washington, the reasons for his election loss are apparent: he was a personally warm and honest man set in his ways, surrounded by loyal and at times incompetent friends, who was too compassionate and hopelessly cautious to cope with the demands of a new era in public life.

His administration, his friends said, had become an embarrassment to many of the blacks who Washington claimed had piggybacked on his earlier quiet civil rights crusade. The business community had begun to turn away. Black churches had dividend loyalties. Organized labor was still on his side yet could not deliver votes. The white community had found new black political friends.

Yet Walter Washington had refused to change, and he made no apologies. "Walter talked about doing more of the same. That may have been his downfall," Flaxie Pinkett said. "A lot of people I talked with who said they voted for someone else said Walter told them before 'Let me see what I can do with my hands untied.'

"They untied his hands and we still did not get change. By then, people felt his style was his style, whether he was appointed or elected. They wanted someone more aggressive."

John R. Risher Jr., the former corporation counsel who was once one of the mayor's closest confidants, said "the team around him was his downfall. Everyone will say he's a good guy." I think that people will also say that the mayor has had a strong relation with Congress.

"But the team around him is what became the focus of the public. His style required able captains and lieutenants and he doesn't have them. People know he sees how poorly they perform and yet they see that he doesn't have it in him to get rid of them. That's why they say we need a change."

Even though he often appeared to be the perfect political campaigner, blessed with a good and sometimes cutting sense of humor, a warm personality and a quickness of feet that allowed him to dance his way out of the toughest questions, Walter Washington was never a real political animal, his friends say.

He realized too late that the stormy stewardship of the city's Department of Human Resources by his old friend Joseph P. Yeldell had become a political effect of his promotion of Yeldell [who was subsequently indicted by a federal grand jury] to be his general assistant.

His campaign organization was the least professional in the primary. It ran just like his bureaucracy, some critics quipped. Indeed, the city elections board he had appointed floundered in counting the ballots of the election that put him out of office.

There are dozens of city bureaucrats who rose through the ranks of District government, bought new cars and homes, sent children to college and enjoyed the trappings of power and prestige with the blessings of Washington or those close to him. Next year, for the first time, there will be a change of guard at city hall and the apparent Democratic nominee, Marion Barry, has already said publicly that many of "Walter Washington's friends" must go.

Some, like housing director Lorenzo W. Jacobs Jr., who followed in city administrator Dugas' footsteps, say they have not given much thought to the idea of leaving, although Jacobs concedes that the new mayor should have the flexibility to have his own people in key jobs.

Others, like environmental services director Herbert L. Tucker, appear to be bracing for a fight, confident that civil service regulations prevent Barry from firing them.

Public information director Sam Eastman said he is willing to go quietly with no regrets, so long as he can find a new job first. "I wouldn't have traded those 10 years for anything, but the results are in; Marion Barry will be mayor," Eastman said. "I'm just looking for a new career."

Outside the District Building there are others whose fortunes have been linked to the political career of Walter Washington. There are the businessmen who have nutured comfortable and long-standing relations with Dugas, the mayor's alter-ego and czar over licenses and permits in the city. There are old-line middle-class blacks who have had prestigious low-numbered license tags, memberships on city board and commissions and the friendship of the city's chief executive to bolster their social status.

There are lobors leaders to whom Washington's administration has given spots on influential city commissions, many city contracts, a high minimum wage and generous unemployment benefits. There are churchmen, whose friendship with Washington has meant housing projects that bear their name, visits from the mayor to important church functions and the ability to better shepherd their flocks by having direct access to city departments that dispense social services.

Many of the ministers who supported Washington and despised Barry are now turning their attention toward Republican nominee Arthur A. Fletcher. Even organized labor, according to labor leader Brock, is considering abandoning the new Democratic nominee to go with Fletcher.

"We lost a friend" when Washington was defeated, Brock said. "I'm not on my knees begging. I was here when Marion came" in 1965.

It was more than four decades ago when Walter Washington, born in Dawson, Ga., and reared in Jamestown, N.Y., by friends and his father following the death of his mother, took the train to this city to begin studies at Howard University. He graduated from Howard in 1938, later took a job with the old Alley Dwelling Authority [which later became NCHA], and married into one of the black first families of Washington when he was wed to Bennetta Bullock, who is now a high Labor Department official.

Washington worked his way through Howard's law school and began to build political roots not only among the influential black middle class, or which the Bullocks were prominent, but also among the city's politically powerful black churchmen. His father-in-law, the Rev. George O. Bullock, was an influential minister, pastor of Third Baptist Church and one-time president of the Lott Carey Baptist Foreign Missionary Convention.

After working his way to the top of a segregated bureaucracy at NCHA, and never forgetting the pains he endured, Washington came to the attention of then-President Lyndon B. Johnson, who appointed him mayor-commissioner in 1967. Johnson predicted privately that Washington would not last a year in the job, and Walter Washington is politely proud to point out that Johnson was wrong.

In 1975, he became the first elected mayor of the city since 1871. Within four years, however, his popularity had waned. He could not be renominated.

There is always talk of a diplomatic post for him. He has had a way with ambassadors. But when some of his political foes tried to arrange such an appointment last year, Washington was never given serious consideration by the Carter administration.

There has been talk of his becoming president of his alma mater or taking a job in a local law firm that would value his experience and expertise.

The Walter Washingtons have enjoyed the mayoral years - the prestige; the audiences with kings, queens, ambassadors and presidents; the friendships and the status as a first family of the nation's capital.

"They're not small people. They've traveled pretty extensively," Flaxie Pinkett said. "They are flexible enough, secure enough emotionally and financially not to be adversely affected by this experience.

"Walter Washington will be remembered by the elderly for certain things, by the have-nots for other things, by the white community for some things. And I think he'll be long remembered for his integrity.

"I don't doubt that history will bring about a deeper appreciation for his service than the election showed. I don't think 70 percent of the people were repudiating Walter in that vote."