It was the kind of campaign appearance that is a staple of mayoral politics in big cities: Martin O'Malley came to a troubled street corner in East Baltimore one evening to show solidarity with residents struggling to rid their neighborhood of drug dealers.

But what happened next was not so common. When it became obvious that no dealers were around--that they had moved their business a couple blocks away--O'Malley (D) charged off to confront them. His surprised hosts and the few police officers present scrambled to follow.

"Brace up! Police coming!" someone cried as the group approached the dozen or so figures hanging out there. By the time O'Malley arrived, the corner was empty, and he had made his point.

"People are just so tired of this," he said, gesturing to the streets around him. "There's absolutely no hope in this. But there's hope now."

Baltimore voters yesterday tapped O'Malley, a 36-year-old Democratic former prosecutor, to be the city's youngest mayor, as he won by a wide margin over Republican David F. Tufaro.

O'Malley, who is white, became mayor of the majority black city by earning the backing of a biracial coalition of political leaders in the city, including state Del. Howard P. Rawlings (D) and state Comptroller William Donald Schaefer (D), the former mayor and governor. After the primary, one analysis showed O'Malley won support from the vast majority of whites and about a third of the blacks who voted.

Gov. Parris N. Glendening (D) said he and the newly elected mayor already have discussed new economic development incentives for the city, and he predicted O'Malley would be warmly received in the state capital.

"There's going to be a tighter working relationship between Baltimore and Annapolis than we've seen in decades," Glendening said last night.

O'Malley takes over a city that is bedeviled by an active drug trade and a murder rate that claims about 300 people a year. The city's court system is clogged with criminal cases and in danger of state takeover. Its school system, which is managed in part by the state, performs at the bottom compared with others in Maryland. Residents pay the state's highest property tax, and about 1,000 people leave the city each month for the suburbs.

But O'Malley believes he can turn things around in part by emulating Schaefer's "Do it now" credo. He said he intends to bring more vigor and accessibility to the job than his erudite but detached predecessor, Kurt L. Schmoke (D).

Pledging reform, O'Malley said he would attack crime with a "zero tolerance" strategy that has proved popular in cities such as New York, Philadelphia and Boston. He said he wants to replace Schmoke's core administration, replacing the housing and police commissioners and the public works director. And he said he wanted to work with city businesses and banks to lure private investment and build on downtown redevelopment.

Schmoke, a former Rhodes scholar, was billed as a new kind of politician when he took office in 1987, an intellectual, buttoned-down mayor who championed the cause of literacy and tried to tackle persistent urban problems. But his tenure was marked by a recession that denied him the financial wherewithal to create programs, and many residents said his administration seemed to lose steam in recent years.

Still, some people expressed concern about O'Malley's priorities. The Rev. Douglas I. Miles, president of the Interdenominational Ministerial Alliance, a group of 200 African American churches that endorsed an O'Malley rival in the primary, said he worries that O'Malley might focus too much on downtown businesses. Many of O'Malley's campaign contributions, which topped $1.3 million, came from supporters in the business community.

Boosting downtown is fine, Miles said, "but not if it's done to the exclusion of where much of the real work is needed, and that is in maintaining and salvaging neighborhoods.

Many voters, however, said yesterday they hoped O'Malley would be an agent of change.

"He seems to have ceaseless energy and optimism--we really need that," said Lois Hennessy, 63, an art teacher at the Maryland Institute, College of Art.

Hennessy said she believes O'Malley will shake up the bureaucracy in city schools and improve the quality of teachers, which she said is "horrendous."

Others seemed less confident in O'Malley even though they voted for him.

"O'Malley has my halfhearted support," said David Shamer IV, 40. "He's young, he showed up too quickly on the political scene. I'm wary of him, that he might be just one of these opportunists."

But Shamer said he voted for O'Malley because, like so many other voters in town this year: "I really feel like it's time for a change. I've been saying it and saying it."

O'Malley grew up in Bethesda and Rockville. He was volunteering on local Democratic campaigns before he was 10, spurred by his parents' interest in all things political. His father, attorney Thomas O'Malley, ran for state's attorney in Montgomery County last year, and his mother, Barbara, is a receptionist in the office of Sen. Barbara A. Mikulski (D-Md.). Politics, Thomas O'Malley said, "was a condition in the house. It was like air."

After attending Gonzaga High School in Washington, where he picked up his interest in Irish rebel music, O'Malley joined the 1984 Gary Hart presidential campaign while in college at Catholic University. He latched on to the Democratic politics of Hart, more pragmatist than ideologue. Today, his former boss on the campaign, Doug Wilson, now national policy director of the Democratic Leadership Council in Washington, says of O'Malley: "Martin belongs to a new generation of political leader who, regardless of age, is beginning to look again at public service the way they did maybe 30 years ago, as a way to make a difference."

Law school at the University of Maryland brought O'Malley to Baltimore, and campaigning on Mikulski's Senate race made him love the city. "It was much easier to feel at home here," O'Malley said. "The people in Baltimore kind of take you in. There's no pretense."

He took a job in the office of the state's attorney, where he learned firsthand about the backlogged court system. Soon, he became interested in seeking political office, and in 1990 he made his first run for it against former state senator John A. Pica Jr., about the time he married Katie Curran, daughter of Maryland Attorney General J. Joseph Curran Jr. (D).

After a weekend honeymoon on the Eastern Shore, the O'Malleys returned to the campaign trail. In the end, O'Malley--whom no one, not even his wife, thought stood a chance of winning--lost by just 44 votes.

"Ever since then, I always bite my tongue when he has these ideas, like, 'I'm going to run for mayor,' " Katie O'Malley said. "He knows what he's talking about."

The role of race--in a city where two-thirds of the residents are black--was debated frequently throughout the mayoral campaign. Initially, O'Malley was accused of deciding to run only after it looked as if he could benefit from a black vote split between the two leading black contenders. Such talk cooled after his primary victory, when he outdistanced 16 candidates and took 53 percent of the vote.

"He had a message of inclusion and diversity, and he addressed some of the major issues that black voters hoped for," Rawlings said. "I don't think there's an end to racial voting when 95 percent of the white voters vote for O'Malley, but I think we made substantial progress."

O'Malley's decisive primary victory and broad support should help ease the transition for him, and with such backers as Schaefer, Curran, Rawlings and state Sen. Barbara A. Hoffman (D), he should be well received in Annapolis, too. But he doesn't think the honeymoon will last long.

"People are going to expect their city to look cleaner and crime to go down, or I'll be a one-term mayor and they're going to look for someone else to do the job," he said.

CAPTION: Democrat Martin O'Malley, Baltimore's next mayor, discusses issues with resident Kendrick Martin while campaigning recently.

CAPTION: "Martin belongs to a new generation of political leader," one booster says of O'Malley, center, shown campaigning in Baltimore last week.

CAPTION: O'Malley--accompanied by his son, William, and his wife, Katie--leaves a polling station.