Occasionally on the campaign trail, Baltimore Mayor Martin O'Malley gets the rare chance to talk about something other than politics - such as in a restaurant during a recent Sunday swing through the Eastern Shore.

"How's the band doing?" asked Jesse Bowden, the bartender in Salisbury's Chesapeake Steakhouse.

Ah, the band. O'Malley beamed. But his press aide cringed at the mention of the mayor's Celtic rock group, O'Malley's March.

Throughout the mayor's 15 years in elected office, his opponents have tried to portray him as all flash, no substance; as a man driven more by personal ambition than public service. And the band has given detractors a perfect symbol.

"The other guys hate the humanity, so they attack it," O'Malley explained to Bowden. "Whenever I pick up the guitar, they act like I fell back into a crack habit."

The 43-year-old Democratic candidate for governor has worked diligently to bury the ambitious and flashy persona - first, he says, by passing on a run for governor in 2002, then by retiring the band last year. And he has in large part outgrown the brazen, loose-lipped style of a young mayor - elected at age 36 in 1999 - who was prone to fiery public tirades.

Today O'Malley tries to project a far more subdued, cerebral presence in his bid to unseat Gov. Robert L. Ehrlich Jr. At events throughout the state, he follows the same effective script to great fanfare: make a joke, make a promise (or 10), quote a Kennedy. O'Malley and his supporters say the maturation is real - lessons from a growing family, the death of his father and the backlash from verbal missteps.

Critics charge that O'Malley has simply engineered a calculated image overhaul, pushed by his advisers to avoid unscripted outbursts. And signs of the younger, brasher O'Malley - including his delight at discussing the band over a Guinness stout - remain.

To win next month, O'Malley must, in part, convince Maryland voters that he is concerned more about what is best for them than what is best for himself.

"My detractors have a tendency to overestimate my ambition and greatly underestimate my conviction," O'Malley said. "They say I want to be president," he said. Then, he added sarcastically: "And my path there was to run as the white mayor of the most troubled black city in America. It was brilliant."

During his eight years on the City Council, he never hesitated to seek the spotlight - earning derision from some council colleagues for pushing headline-grabbing resolutions over substantive bills. As the city was mired in a decade of 300-plus homicides per year, he earned credibility by relentlessly attacking the policing efforts of Mayor Kurt L. Schmoke's administration, setting the stage for his 1999 mayoral campaign, in which he pledged to cut homicides to 175.

O'Malley overcame long odds to win on a message of "change and reform" and tougher policing. It helped that he had the backing of several black lawmakers, the first of whom was state Sen. Joan Carter Conway.

Some say he was just what the city's status quo needed. "He holds government accountable, and he doesn't tolerate any foolishness or mediocrity," said Councilman Kenneth N. Harris Sr., who clashes frequently with O'Malley.

The mayor instilled an urgency that helped revitalize city government. After the polite, aloof Schmoke, O'Malley took City Hall by storm, riding snow plows, cleaning graffiti, announcing plans to buy up 5,000 vacant homes, mocking State's Attorney Patricia C. Jessamy by using stick-figure sketches to show how the prosecutor's office he once sought should work.

"I believe he went into it with that ambition to change things for the better," said City Councilwoman Mary Pat Clarke. "It doesn't mean he's a perfect person."

Within three years, his independent style cost him allies.

The first was William Donald Schaefer. The state comptroller - who had previously served as both mayor and governor and has picked fights with his successors - asked to be O'Malley's liaison to the business community. The mayor said a miscommunication tanked the idea.

"I believe he thought that meant I was not to call members of the business community without checking with him first," O'Malley said.

Schaefer said in an interview that O'Malley simply refused. "He didn't want anyone but himself to be in charge," said Schaefer, who threw his Little Italy base behind O'Malley in 1999. "He dumps people after he uses them. He's always looking for the next job."

In January 2001, O'Malley unleashed a profanity-laced tirade against Jessamy, angering not only the city's top prosecutor but also some of her allies in Annapolis.