Mayor Marion Barry stared at his hands and maintained a poker face the other evening after former City Council chairman Sterling Tucker stood up at a candidates' forum and declared he would not challenge Barry for the Democratic nomination for mayor this fall.

Seeing his 1978 rival bowing out before the 1982 race barely had begun did not seem to faze the mayor. It was the latest in a month of surprises that have shaped the early stages of the race and, in the view of some political observers, perhaps enhanced Barry's prospects for reelection.

For months, the mayor has been buffeted by criticism of his handling of city financial problems and government inefficiencies--the latest chapter occurring just last week, when it was disclosed that as many as 50,000 of the estimated280,000 registered voters in the city may not be able to vote in the fall primaries because of errors by city election officials. Still, Barry and his supporters are feeling some cause for celebration these days:

* The announcement of the Pride indictments last Monday put to rest 2 1/2 years of whispers that Barry might be implicated in the federal grand jury probe of alleged misuse of funds by a real estate spinoff of Youth Pride, a self-help organization cofounded by Barry and his ex-wife, Mary Treadwell. Treadwell and four of her associates were indicted. The mayor, who had never been implicated in any of the charges, was not.

* After weathering a series of financial crises, Barry could boast last month that the city finished 1981 with a whopping $68 million surplus. The unexpected development was roundly cheered by businessmen, civic leaders and key members of Congress. Earlier, some of them had criticized the mayor's handling of city finances.

* Finally, with Tucker, who lost to Barry by only 1,500 votes in 1978, out of the race, the field of challengers lost the only potential candidate who had demonstrated citywide appeal in an earlier contest for mayor.

Barry was in good spirits by week's end, telling a reporter that "things are looking better all the time." He said he hoped public interest in the Pride investigation would soon fade so that he could devote most of his campaign to discussing his achievements and on-the-job experience.

"If it's left alone, the political discussion about the indictments would die of its own weight," Barry said in an interview Friday. "Of course there is going to be some pro and con discussion of it . . . I don't pay any attention to it. I've been busy with city business and campaign business. Since it's not a fact, I've spent no time analyzing the fallout from it."

"The way I feel is it should not be an issue in the election unless my political opponents make it an issue," he added.

Though none of the alleged illegal activities, which took place between 1974 and 1978, involved Barry, Treadwell, whom he divorced in 1977, was at the center of them.

She was charged with conspiracy to defraud the government through false statements, mail fraud, wire fraud and three counts of tax evasion for her alleged failure to pay more than $52,000 in income taxes between 1976 and 1978. Treadwell, who is to be arraigned March 3, has denied all wrongdoing.

Barry has said that he and Treadwell always filed separate tax returns and lived apart during the last years of their marriage. Barry also has said he severed all ties with Pride and its affiliated organizations in early 1978.

Moreover, he was never an official of P.I. Properties, the real estate spinoff that prosecutors alleged Treadwell and the others used to steal, divert and misappropriate thousands of dollars from the federal government and tenants at three low-income projects they managed.

And last year, he received a letter from the U.S. Attorney's Office informing him that he was not a target of the grand jury's investigation.

As long as the investigation was incomplete, however, speculation was rife in some political circles--particularly among Barry's political opponents.

Publicly, however, they have gingerly skirted making statements about the potential political impact of the Pride case. But interviews last week with scores of area businessmen, labor officials and church leaders indicate that Barry may have difficulty quickly putting the matter behind him.

Ron Richardson, head of Local 25 of the Hotel & Restaurant Employees Union, said the Pride indictments last week prompted some of the union's members to inquire about the union's position on the mayor's race.

"I keep telling them that the labor movement has not made up its mind," Richardson said. "But some individuals look at the Pride thing and think the mayor's responsible for what happened. I say Marion Barry is not alleged to have done anything, and if he did, he would have been indicted. But they can't believe he didn't know anything about the situation." In 1978, the union supported then mayor Walter E. Washington in the Democratic primary.

Businessman John W. Hechinger, a Democratic national committeeman, said last week that he thinks Barry should confront the Pride issue "head on" in the campaign, making the case that he was "clear of any problems" after having been "examined with a fine-tooth comb."

However, the Rev. Ernest Gibson, pastor of First Rising Mount Zion Baptist Church and executive director of the Greater Washington Council of Churches, said he thinks the Pride case is having little impact on voters' attitudes.

"So far I have not sensed among my peers and the circle in which I operate any sense of a shadow on Marion Barry because a spinoff group of Pride got into trouble," Gibson said.

While the political fallout from the Pride case is difficult to measure this early in the campaign, Barry is getting some favorable reaction to the city's financial surplus and his handling of the budget.

Realtor Foster Shannon, of Shannon & Luchs Co., said the surplus that turned up in the city's 1981 audit was a "positive sign," adding, "I can only look at it as a plus for the mayor."

Philip Dearborn, former financial counselor to Barry and an official with the Metropolitan Washington Research Center, said the business community response has been favorable--despite criticism from some City Council members that the mayor hasn't had control of the budget since he took office.

"I haven't found anybody who gets upset about the city showing a surplus--even an unexpectedly large one," Dearborn said.

Barry's opponents in the primary have shown little inclination to applaud the surplus, which appeared despite earlier predictions by the mayor of a potential deficit as large as $60 million.

"I want to know how somebody can be talking about a $60 million deficit for a fiscal year and then end up saying they have a $68 million surplus," said Council member John A. Wilson (D-Ward 2), chairman of the Finance and Revenue Committee and a candidate for mayor.

"Does that make sense to you? Not to me. Who knows what's going on with that budget? We don't get the information down here in the council so I don't know," Wilson said.

The City Council approved the broad outlines of Barry's proposed 1983 "people's" budget, which many observers described as a classic "something-for-everything" election-year document.

[Three of the four council members running against Barry--Wilson, John Ray and Betty Ann Kane--opposed the budget, while a fourth, Charlene Drew Jarvis, voted for it.]

The mayor, in turn, informally agreed to a council plan to spend more for education and less for debt retirement. But in the same breath, Barry threatened to veto the overall budget unless the council specifically identified new revenues from taxes that he claims are essential to balance the budget.

In so doing, the mayor simultaneously cast himself as a benefactor of the public school system and a fiscal conservative.

While Sterling Tucker chose not to enter the race, the field of challengers to Barry has grown rapidly--providing a strong indication in some political circles that the mayor is perceived to be vulnerable.

The challengers besides Ray, Kane, and Wilson include former Carter administration official Patricia Roberts Harris; Morris Harper, a Washington physician, and Dennis Sobin, publisher of a newspaper that features sex-oriented personal ads. Council member Jarvis (D-Ward 4), said she plans to announce her candidacy early in March.

Ray, the first Democrat to formally enter the race, spent yesterday campaigning in Ward 8 with Robert Kennedy Jr., the 27-year-old son of the late senator and presidential candidate. Ray's campaign, meanwhile, has shifted from advertising on radio with a jingle, "That man John Ray," to advertisements on the sides of Metro buses that stress Ray's "integrity."

Wilson, who has been knocking on doors almost daily since entering the race last month, has launched a television ad campaign that features a dripping faucet to symbolize waste in government. A hand appears during the commercial to turn off the faucet, and then Wilson is shown, saying he is the man to fix the city's problems.

In his early campaign forums and meetings, the usually combative Barry has taken on a conciliatory tone. He has said repeatedly that while his administration has made mistakes, he only has control over about 200 appointed jobs. He says he can't make sure every bureaucrat "answers the phone the right way."

Although Barry has occasionally been asked about the Pride investigation during public appearances, voters generally talk more about such problems as government inefficiency, housing and crime.