In the spring of 1977 Irma Marquart heard that Harry R. Hughes had resigned from his post as state secretary of transportation on principle and she thought to herself, "here is a man of integrity."

Last July she finally met Hughes, then an underdog candidate in the Democratic gubernatorial primary. "He looked kind of depressed so I impetuously said to him, 'If you can at all afford it, hang in there. You're the best man.'"

By August, she was a volunteer for Hughes, one of several hundred who showed up at the first statewide volunteer meeting Hughes held. "I was the only one from north Baltimore so, zap, I became the zipcode captain for zone 10. I had no idea what to do but, by gosh, we got together a lovely group of volunteers."

Hughes carried north Baltimore. "I would have shot myself if he hadn't," Marquart said.

The small organization that carried Harry Hughes to one of the most stunning upsets in Maryland history was made up of political innocents like Irma Marquart, people who are the antithesis ofthe Baltimore machine workers who normally bring out the votes for the winners.

Like everything else that led to Hughes' victory in Tuesday's primary, his campaign was completely unorthodox. On election day he said he did not pay a single worker to get out the vote.

Hughes waited until August to hold his first statewide volunteer meeting - about one year behind his three opponents - and because there were not enough workers to cover the state by precinct, the state was carved up by zip codes.

But even that spread the volunteers thin so only Baltimore and Baltimore County had zip code captains. The rest of Maryland was organized by county chairmen.

"I never counted the number of volunteers we had," said Pat Hughes, wife of the nominee and his campaign office manager. "It didn't seem to matter how many there were. I doubt if we ever had more than, say 5,000."

While the other candidates relied on the traditional tactics of mass mailings, extensive television advertising, special interest groups' endorsements, political machines and publicity stunts, Hughes counted on his free television appearances and later on the important endorsement of the Baltimore Sunpapers.

"We only had two mailings. I think a lot of the things people do in campaigns are a waste of money," said Pat Hughes.

Even the mailings were something other than the finely targeted exercises of the other candidates. Hughes first sent a fund-raising mailing to all the attorneys in the Maryland State Bar Association, "That wasn't terribly successful," said his wife.

His second mailing was done during the last weekend of the campaign, to all the registered Montgomery County Democrats who had voted in the last three elections. But because it was done by zip code, several hundred were missed because they had Washington, D.C., zip codes.

During the first months of the campaign, Hughes headquarters at the Lord Baltimore Hotel was rarely filled with more than four people: his wife, his press secretary, campaign manager, and secretary. Up until the last days of the primary, the office was closed by 6 o'clock each evening and most weekends.

"Harry Hughes will win this campaign by being himself," Joe Coale, the manager, said repeatedly.

Until mid-July, Pat Hughes' file of volunteers held fewer than 1,000 cards. Then Hughes appeared on the first television debates with Walter S. Orlinsky, Baltimore City Council president and Theodore G. Venetoulis, Baltimore County executive. The front-runner then, Acting Gov. Blair Lee III, failed to show up.

"The thing started to pick up then," said Pat Hughes. "The phones rang all day after the debate."

To Coale's delight, unsolicited contributions began arriving in the mails. Brochure and bumper sticker stocks could be replenished and the campaign treasury could grow. By election night, Hughes had raised about $200,000, one-fourth of the amount Lee raised.

Then the Sunpapers gave their crusading endorsement to Hughes and the signs looked good to the volunteers.

"We did old-fashioned door-to-door campaigning and before the endorsement people would say 'yes, he's the best candidate but I don't want to throw away my vote'," volunteer Marquart recalled. "We got so angry. Then the endorsement came and that was that. People said he was the best candidate and that they would vote for him."