It seldom took Harry W. Kelley more than a stroll down the boardwalk to win a term -- six times -- as mayor of this seaside hotspot. Politics scarcely seemed hazardous to his health.

But nearly every time he ventures out of Ocean City on his long-shot bid for the Democratic nomination in the Maryland governor's race, Mayor Kelley now seems to take his life in his hands.

Campaigning in Baltimore last fall, he got mugged.

On Kent Island last winter, heading home after a day stumping for votes, he crashed his Lincoln Continental into a truck.

Just before a speech in Towson, his only good ear conked out; to give intelligent answers from questions in the audience he had to dig into his campaign chest for a $395 hearing aid (doctors told him later his condition was the temporary result of "waxy build-up").

Even more dangerous to a man who describes himself as "charismatic, colorful and so forth," his campaign advisers tried to monkey with his image. Wanting him to look like "governor material," a group of Ocean City real estate dealers, contractors and cronies persuaded Kelley to replace his leisure suits and loud blazers with several thousand dollars' worth of gray flannel and pin strip duds from Brooks Brothers. And they entreated him to curb a tongue he boasts is "rude, crude and abrasive."

So in April when Kelley's cousin, the treasurer, reported that the Kelley for governor campaign was broke, the mayor made a decision that he said turned his legs rubbery, worse than any time since 1937 when he was captain of the Duke University boxing team: He dismissed his staff and plunged toward the governorship alone.

"She's been a rough trip," said Kelley, safely ensconced on home turf over the Labor Day weekend. "When all these things were happening, I thought, 'Jimminy Christmas! If I'd have bought a turkey farm, they'd have outlawed Thanksgiving.' "

With most polls showing him getting no more than 10 percent of the vote, Kelley has undertaken his toughest wager. Only his most devoted partisans think he can win. He's a local politician banking on the fact that much of Maryland stops by his town in the summer. His biggest political asset is his reputation as a battling, outspoken man, a man with, in one of his favorite words, character.

At 64, with a wrinkled face, ready grin, narrow blue eyes and a screech of a laugh that sounds like an amplified crow, Kelley doesn't just possess character. He exudes it. He trades in it. He rides it like a surfboard. He's a dramatis persona, easily discussing himself in the third person. In one of his radio ads for example: "The big oil boys put the squeeze on Ole Kel." He answers the phone fortissimo: ("Why Hello There George, How The Hell Are You!!") He'll take a complete stranger into a clownish embrace, and he cuts up no end with a gang of local characters and cohorts he calls "the boys."

Kelley's political base rests squarely in Ocean City, in the converted high school that serves as city hall and the English Diner where he stops for coffee each morning to swap news with the boys. The fortunes of the mayor and "his city," as he refers to it, are so intertwined that Kelley has come to personify the commercial sprawl of condos, miniature golf courses and sandwich shops that stretch for 10 miles along the Atlantic Ocean.

"I don't see myself as a salesman but evidently I have been one," Kelley said. "This place has gone beyond my dreams."

During his time in political office, first as a councilman for 16 years, then as mayor since 1970, Ocean City has grown from a resort that could handle about 30,000 visitors a day in the summer to a vacation boom town with a summer population of nearly 300,000. Kelley has promoted, protected and supervised the growth of the city with zeal, keeping gambling out, cracking down on obscene T-shirt vendors, and risking jail when he bulldozed sand back onto the beaches in defiance of the Army Corps of Engineers.

The coup that brought Kelley the most publicity was during the gasoline crisis in 1979 when he shopped around on the spot market and used city money to buy extra gas so tourists wouldn't be scared away from taking trips to Ocean City. "Maybe it was black market gas," Kelley said, "but I got her. People are saying, 'Hey Kel, you did us a favor. We're gonna pull the lever for you.' "

His drive for the governorship was launched more than a year ago, a product of what he called a long-standing "desire to serve the state."

"I wanted to see if I had reached my potential," Kelley said, sauntering the boardwalk last Saturday morning. Fresh from his showing the night before on a televised debate with rivals Gov. Harry Hughes and state Sen. Harry McGuirk, Kelley was greeted enthusiastically by people riding on the boardwalk shuttle bus. "I felt I had done it for Ocean City; I felt I could do it for Maryland."

Thus his slogan, "He did it for Ocean City, he'll do it for Maryland," was born.

To those who see Ocean City as an example of development run amok, the slogan sounds a bit ominous. As bartender Mike Fritz put it, "Mayor Kelley's fine for a small town, but I wouldn't put him in charge of the state. He'll bulldoze Annapolis."

Kelley's campaign may have peaked last October with a party for 3,200 people at the Ocean City convention center. He described the gala that featured two orchestras, five chefs and 10,000 or so balloons as "the greatest show since Barnum & Bailey." He raised $70,000 that night but unfortunately the party was nearly as expensive as a circus and left the campaign around $10,000 after the bills were paid.

He had his darkest moment April 7 when he fired his campaign advisors who, after trying to "tone me down," told the mayor he couldn't win.

"What the hell good is a guy if his heart's not in the campaign," Kelley said. "I said 'Hey, thanks, but I'll go it alone.' I've been a fighter all my life. I was a six-month baby. I came into the world weighing two pounds. They put cotton all over me. I kicked it off, and I've been kicking ever since." Kelley has had three radio spots scripted, including one that tries to capitalize on the Brooks Brothers suit fiasco: "Political pros told Harry Kelley to buy some new clothes.

"Harry Kelley, they said, didn't have a chance.

"So they told him to quit. Instead Harry Kelley fired them. He gathered his family, his friends, and he got out his old suits.

"Now Harry Kelley, without his campaign professionals and without his fancy clothes, is running for governor -- hard."

In place of the campaign staff, Kelley has -- what else -- characters. There is, for example, the hefty Captain Jack Bunting,who says: "I weighed 13 pounds at birth. That makes me the only man in the world trying to lose weight since the day he was born". The captain touts Kelley nightly to passengers taking the evening cruise on his boat, the Miss Ocean City.

Kelley is grateful for the way the campaign has brought his family together. His daughter Connie runs the campaign headquarters in Catonsville where his running mate for lieutenant governor, Mark Vincent, a 39-year-old lawyer, also lives.

To all Kelley's troubles, he adds another one: Last week, he shook 6,000 hands in two hours at a Westinghouse plant near Baltimore.

"It was worse than any fight I ever had," Kelley recalled. "I thought, 'You dumb cluck, you're not going to be able to handle this.' I was grabbing hands two at a time. I had a headache that went down through my neck to the shoulders."

So the showman of the Eastern shore, with no position papers, no paid staff, no endorsements, no TV advertisements, presses ahead with what for lack of a better word is a populist's candidacy. He underscores his main theme: Maryland needs to be revitalized with new business. He stresses his reputation: the man who got the gas for Ocean City. And he dreams: "I got no campaign manager, no staff, no big business behind me. But suppose I knock those cats off? I got a shot. What if people say, 'This guy Kelley is some kind of character!' "