A city frequently divided by politics came together yesterday behind Democrat Sharon Pratt Dixon to give her an overwhelming victory that extended far across racial and class lines, according to interviews with a random sample of voters leaving the polls.

While handing Dixon the first general election victory of her fledgling political career, these same voters rejected by a wide margin the bid of embattled Mayor Marion Barry to win an at-large seat on the D.C. Council.

Even in defeat, Barry's appeal to a significant proportion of city voters remained strong: Nearly a third of all Dixon voters said they would have voted for Barry if he had been in the mayor's race. Yet it appeared from the exit poll and early returns that Barry would not draw that many votes in his at-large bid.

The survey found that Dixon overwhelmed Republican nominee Maurice T. Turner Jr. among blacks as well as whites, young as well as old, rich as well as poor. The strength of Dixon's candidacy was evident in the fact that she appeared to have won more Republican votes than Turner -- 49 percent to 42 percent.

According to the poll, black and white voters supported Dixon almost equally, and overwhelmingly. She received the support of eight out of 10 men and nearly nine out of 10 women.

Among those voters with household incomes of $30,000 a year or less, Dixon collected eight out of 10 votes, while receiving three out of four votes from those with incomes of $50,000 or more.

Majorities of these same groups also rejected Barry's bid for an at-large council seat. Eight out of 10 blacks interviewed did not select Barry as either of their two choices to fill at-large seats. Among whites, more than nine out of 10 rejected Barry.

But the apparent depth of the voter anger Barry faced perhaps is best seen among those voters who Barry previously had counted among his strongest supporters.

While Barry campaigned on his record of providing services to the city's poor and elderly residents, big majorities of both groups rejected his candidacy.

According to the exit poll, fewer than one out of four residents earning less than $15,000 voted for Barry. And among elderly black voters, a constituency Barry had vigorously courted in recent weeks, only a third voted for him.

Results of the poll also suggested that Dixon's victory was the product of a potentially unstable coalition of voters with decidedly different views and expectations about the direction of city government.

Those differences were seen clearly when voters were asked about what may emerge as the single greatest issue facing the new mayor: how to balance the city's budget, which is projected to be $100 million in the red this fiscal year.

Overall, nearly half of those interviewed -- 49 percent -- favored increasing taxes to solve the city's budget woes, while 36 percent favored cutting taxes. The more-affluent voters favored service cuts, and less-affluent voters supported tax increases, echoing the voter divisions along economic lines that were apparent in the Democratic primary.

Many political observers say the budget challenge will be the first and perhaps most significant test of Dixon's administration.

"A big challenge she faces is dealing with city finances in some kind of logical way," said Sam Smith, editor of the Progressive Review. "We really don't know how high the stack of unpaid bills is going to be. There could be some brutal surprises waiting for her."

The problem for Dixon is compounded by her strong stand against Barry and her image as a reformer who would clean city hall "with a shovel, not a broom."

"I'm not totally convinced that she's as enthusiastic about reform as her supporters are," Smith said. "The danger is that her support came fast and it could disappear very fast. There was a certain amount of desperation this year, and she captured that politically. Whether she can hold it politically remains to be seen."

"One of the things that accounts for her victory is that she was able to consolidate the Democratic Party early on," said Ron Walters, chairman of the political science department at Howard University. "She now has to consolidate a government very quickly. If she delays, she can take some very tough political hits."

Yet most observers expect a not-so-brief honeymoon for Dixon. "I think there has been a collective sigh of relief that it won't be Barry," said Mark Plotkin, an analyst for radio station WAMU-FM. "There definitely will be a honeymoon period. People are wanting to like her. And she will be able to sail on that for a long time."