On a breezy Saturday afternoon, Martin O'Malley held court in a small park in this quaint Eastern Shore community. He was only 70 miles from home, but Baltimore seemed worlds away as the mayor spoke of his battles there against violent crime and drug addiction.

"We started making progress and stopped making excuses," O'Malley told a crowd of about 75 political activists and other onlookers as the sun flickered through the trees and a fountain gurgled nearby. "We're by no means done . . . but we are moving in the right direction."

As the gathering made clear, the Democratic mayor is hoping that in November 2006, his stewardship of Baltimore will help catapult him into the governor's mansion. But to succeed, he will have to overcome some odds: History has shown that being a big-city mayor is hardly a reliable springboard to statewide office.

Just this week, O'Malley found himself on the defensive when FBI statistics showed that Baltimore's violent crime climbed 4 percent last year, the first increase since he was elected in 1999 and a statistic that could dog him through the campaign.

In races across the nation, mayors with broader ambitions have been hobbled by resentment of their city and perceptions that theirs is an alien land rife with social ills not easily understood by rural and suburban voters.

"Usually, a mayor is so identified with the interests of the city that it's a negative in other parts of the state," said Merle Black, a political science professor at Emory University in Georgia, a state with a storied tradition of candidates running against Atlanta.

The ranks of mayors who have failed to make it statewide hail from all regions of the country and include many who were highly regarded during their city hall tenure. Among them: Kevin White (D) of Boston, Tom Bradley (D) and Richard Riordan (R) of Los Angeles, Andrew Young (D) of Atlanta and, more recently, Ron Kirk (D) of Dallas.

O'Malley, of course, has an example far closer to home. In 1986, William Donald Schaefer (D) ascended from Baltimore City Hall to the governor's mansion in Maryland, running partly on his efforts to revitalize the Inner Harbor during his 15-year tenure.

Maryland's demographics have changed significantly in the past two decades, however. In 1986, more voters resided in Baltimore than any other jurisdiction in the state. The heavily Democratic city now ranks fifth, behind Montgomery, Baltimore, Prince George's and Anne Arundel counties. In the primary, O'Malley will probably face a suburban county executive, Montgomery's Douglas M. Duncan, who can point to such successes as the revitalization of Silver Spring and the recent completion of the Strathmore Hall concert facility.

And as the 2002 election of Maryland Gov. Robert L. Ehrlich Jr. (R) demonstrated, Republican, independent and Democratic swing voters are also gaining a greater say in Maryland politics. Statewide, the share of registered Democrats has declined from 67 percent when Schaefer was first elected governor to 55 percent.

In an interview, O'Malley said he hopes to follow the model of former Philadelphia mayor Edward G. Rendell (D), a dynamic personality who in 2002 succeeded in reaching out to suburban voters and becoming the first resident of his city to serve as governor since 1914.

"I think Pennsylvania is fortunate to have a governor that understands cities not just for their problems but for their potential," O'Malley said.

Rendell, like O'Malley, is white. Several of the mayors with stymied ambitions have been black, which analysts said was at times an obstacle in statewide elections.

Thomas F. Schaller, an assistant professor of political science at the University of Maryland Baltimore County, noted that most voters who move to the suburbs and exurbs do so to escape the city. It is an open question, he said, how willing they will be to embrace a mayor as governor.

But Schaller, who is active in Democratic politics and supports O'Malley, added, "If you can show success in managing the toughest of the state's 24 jurisdictions, you can make a good case that you're qualified to lead the other 23."

By many objective measures, Baltimore has made progress since O'Malley's first election in 1999.

The mayor's speeches are laced with statistics pointing to drops in overall crime, gains in achievement by schoolchildren, success in treating the city's drug addicts and growth in business and residential ventures.

A national media buzz that began early in O'Malley's tenure has intensified, with Time magazine last month naming him one of the country's five best big-city mayors and the Wall Street Journal spotlighting Baltimore as an attractive destination for homeowners.

But O'Malley has suffered his share of setbacks. The city has had four police commissioners in O'Malley's five years. The city's high school graduation rate, the state's lowest, has stagnated in recent years. The homicide rate of 1 per 2,350 residents remains far higher than in most large cities and has not dropped as rapidly as O'Malley pledged it would in his campaign. Add to that last year's increase in violent crimes.

O'Malley sent an e-mail to business leaders yesterday saying the uptick comes in the context of a five-year drop in the crime rate, a decline steeper than that of any other large U.S. city.

"The reason we make progress is because we're relentless. It's not because we're successful every day, over every week or every year," he said in an interview.

Duncan sent his own e-mail to supporters yesterday, noting the increase in Baltimore's crime and stressing a 9.5 percent decrease in Montgomery County crime last year.

Last month, when O'Malley made a public appeal for greater state assistance in aiding juvenile offenders, an Ehrlich spokesman responded by highlighting the increase in the city's homicide count.

And until recently, the state Republican Party displayed a large sign in its Annapolis headquarters quoting a Democratic delegate's assessment of Baltimore: "It's dirty, it's bankrupt, it's not safe, the school system is in total disarray."

O'Malley disputed the sentiments of the sign but acknowledged that part of his challenge will be battling negative perceptions of the city, particularly among voters in the Washington region and other parts of the state.

At the same time, aides expect O'Malley to benefit from the fact that Baltimore television stations reach about half the state, including surrounding suburban counties and most residents of the Eastern Shore. So although Chestertown residents, for example, may spend little time in the city, they experience it vicariously through the nightly news, on which O'Malley is a constant presence.

Moreover, O'Malley boosters argue, many who have left Baltimore retain a soft spot for the city.

"I think people are smart. I think people are intelligent. And I think people are fair," O'Malley said. "They respect leaders who, rather than shirking their responsibility, are willing to tackle tough problems."

Staff writers Matthew Mosk and Ylan Q. Mui contributed to this report.

Martin O'Malley (D) aims to follow the model of Edward G. Rendell (D), the Philadelphia mayor who became governor.