Bruce Springsteen's "Land of Hope and Dreams" blared over the loudspeakers as supporters waved yellow signs proclaiming "Maryland can do better" and a lime-green banner announced the man the crowd had come to see:

Martin O'Malley, native son of Montgomery County, mayor of Baltimore and now Democratic candidate for governor of Maryland.

O'Malley's official declaration of what he acknowledged was "the worst-kept secret in Maryland politics" played out yesterday in three locations, each underscoring an objective the mayor must achieve in his bid to replace Gov. Robert L. Ehrlich Jr. (R) next year.

In Rockville yesterday morning, O'Malley went straight to the base of his Democratic rival, County Executive Douglas M. Duncan, to remind voters of his local roots.

In a lunch with supporters in Prince George's County, home to more registered Democrats than any other jurisdiction in the state, he spoke of common challenges his city shared with their county: fighting crime, improving schools and attracting upscale development.

But it wasn't until yesterday evening, when O'Malley returned to the city that has twice elected him mayor, to a crowd of longtime supporters in a park he helped revitalize, that he made his candidacy official.

"I've reached the conclusion that we cannot allow our state to coast or slip backwards, because a stronger Maryland can do better," O'Malley, 42, told a crowd that police estimated at 2,000. "I stand humbly before you today to declare my candidacy for governor."

The speech that followed offered a vision for investing more in the state's schools, expanding access to health care, restoring the Chesapeake Bay and fighting traffic congestion.

What the day lacked in suspense, it made up for in political pageantry. O'Malley began his day with a nod to the Washington suburbs, which have gained significant clout picking Democratic candidates since 1986, the last time a Baltimore mayor -- William Donald Schaefer (D) -- moved on to Annapolis.

"Every day, I draw on the lessons that I learned here," O'Malley said during an appearance in Courthouse Square Park in Rockville, where he was introduced by his mother, who still lives in the county. "I thought it was important to come home, and to come back to this place."

O'Malley, who lived in Montgomery through college, is attempting to cut into the Duncan's base in the Democrat-rich county, which also will be key to the fortunes of the party's nominee in November against Ehrlich.

Joined on stage by his wife and four children, O'Malley also sought to bolster the case that the violent city he inherited has made significant strides since he took office in 1999.

"We stopped making excuses and started making progress," he told a crowd of several dozen people, including a group of high school friends, and a bank of more than a dozen television cameras in an oval park ringed with neatly manicured trees.

Duncan, who plans to announce his candidacy in the coming weeks, has hammered O'Malley in recent days, saying that his stewardship of Baltimore has not been as successful as he claims and that the city is beset with problems. Yesterday was no exception.

In a statement distributed by the campaign, Montgomery County Council member Nancy Floreen, a Duncan supporter, said she welcomed O'Malley to Rockville. But she went on to say that Montgomery "has about 20 homicides a year, so most folks will be concerned to learn that Baltimore has had more than 200 this year, and that the mayor has failed to keep his commitment to lower that number to 175."

The tactic did not seem to sway James Little, a retiree who wheeled his bicycle into the park and was among the early arrivals.

"ABD -- anybody but Duncan," Little said when asked what brought him to the event. "He's spending too much time running for governor instead of running the county."

The latest independent polling on the race, conducted in April for the Baltimore Sun, showed O'Malley beating Duncan by double digits in a primary contest and with a slight lead over Ehrlich in a general election matchup. Duncan's campaign produced a more recent survey showing a somewhat tighter primary race.

Securing the nomination depends, in part, on winning over voters in Prince George's County, where O'Malley and his wife joined about a dozen supporters at a large table against the back wall of Gladys Knight and Ron Winans' Chicken and Waffles restaurant in Largo.

Hasan Solomon, a political activist in the county, said the location was chosen to highlight an upscale eatery in a county that has long sought that kind of development.

Solomon said he believed that O'Malley has great potential in the county, given the common challenges faced by the two jurisdictions.

"Let's stay in touch as we ramp up," O'Malley said as the lunch broke up.

He worked the room on his way out, as he had on the way in, making introductions and seeking connections before the September primary.

Lashawn Banks, a federal employee who was dining at the restaurant for the first time, said she had seen O'Malley on the news that morning but didn't know who he was. "I can't have an opinion on someone we don't know about," Banks said.

By dusk, O'Malley was on stage in a city where he is a constant presence on the nightly news and won reelection last year with 87 percent of the vote.

O'Malley recounted Baltimore's dramatic decline in population since World War II and the city's unwanted distinctions in the 1990s of becoming America's most violent and drug-addicted big city.

"Challenges remain," he said. "But we've gone from being ridiculed on the 'Tonight Show' to being recognized by Time magazine, the Wall Street Journal, Business Week and 'Nightline' -- just this year -- for the progress we've made."

The state Republican Party offered a far different assessment of the city's condition, echoing many of the criticisms leveled by Duncan recently. A flier distributed by the party referred to "Baltimore's Horrendous Crime Epidemic" and noted that "Baltimore schools rank as the worst in Maryland."

Ehrlich was far more restrained in his assessment. During a stop in Montgomery County yesterday, he said he welcomed O'Malley into the race and applauded him for following "his dreams."

Staff writer Tim Craig contributed to this report.

Baltimore Mayor Martin O'Malley (D) is running for governor.