Acting Gov. Blair Lee III maintained a solid lead in Maryland's Democratic primary for governor, white Theodore G. Venetoulis held steady and challenger Harry R. Hughes showed astonishing gains, according to a newspaper poll published here today.

The statewide poll, published by The Baltimore Sun, shows Lee leading with 34 percent of the vote. Hughes, who received a front page endorsement by The Sun three weeks ago, received 20 percent of the vote, compared to 21 percent for Venetoulis, who has been considered Lee's strongest challenger. Baltimore City Council President Walter S. Orlinsky received 3 percent.

The Sun's poll results substantially conflict with a poll published a week ago in the Baltimore News American showing Hughes with just 8 percent of the vote. Lee led the field in that poll with 31 percent followed by Baltimore County Executive Venetoulis, who received 21 percent.

"There's a huge credibility problem with this poll," said Jackie Smelkinson, Venetoulis' campaign manager. "Polls can be technically flawed and I believe this one is. It conflicts with everything we know and everything we feel in the streets."

The Sun poll, compiled early this week, deals a heavy blow to Venetoulis, who is running as a reformer. Venetoulis had gained considerable ground in recent weeks and was perceived as the only challenger with the organization and statewide appeal to offset Lee's commanding lead by primary election day.

Despite Lee's apparently comfortable lead in the polls, his campaign this week took two actions that, to his opponents at least, indicated that the Lee camp is becoming insecure and desperate.

First, Lee bolstered his campaign treasury with $110,000 in loans, $70,000 coming from his personal holdings and the rest from an old friend whom he refused to identify and "an uncle." Then, with some of that fresh money, the acting governor began an anti-Venetoulis radio blitz.

Two of those ads have been withdrawn because they were factually incorrect or misleading. Another one begins with the words, "My momma used to say that when a fish grows rotten it stinks from the head. I'm sorry, but that makes me think of the executive head of Baltimore County, Ted Venetoulis."

The personal loans and radio ads have created such controversy that many political observers believe they could hurt Lee's campaign. Lee's son, Blair Lee IV. was so upset by his father's handling of the personal loans at a recent press conference that, according to another Lee aide, "the guy panicked - he wouldn't talk to anyone for hours."

Hughes, the former Maryland transportation secretary who has never received more than 8 percent of the vote in a published poll, picked up his strength after the Sun's glowing endorsement Aug. 20 and several television debates in which he was thought to have come off favorably in comparsion with his three opponents.

Much of Hughes' extraordinary gain apparently came from the sizable bloc of undecided voters. When the News American took its poll between Aug. 18 and 24, 30 percent of the voters had no chocie. The Sun poll reduced the number of uncertain ones to 22 percent.

Hughes, a native of the Eastern Shore who now lives in Baltimore, drews most of his new support from communities serviced by The Sun. In Baltimore County, Venetoulis' home, he leads the county executive by 2 to 1 and is leading Lee by 6 percentage points.

While Lee holds a narrow lead in voter-rich Baltimore with 24 percent of registered Democrats polled, Hughes attracted 22 percent of the vote in a tie with Venetoulis.

The Washington suburbs are firmly in the camp of Lee, a Montgomery County resident who received 47 percent of the voters polled by The Sun. Hughes only drew 9 percent of the vote in Montgomery and Prince George's counties, compared to 20 percent for Venetoulis.

Hughes, 51, a majority leader of the state Senate in the 1960s, has tired to project the image of experience and high principle, a man who resigned as transportation chief last year after suspecting wrongdoing in the selection of a Baltimore subway contractor.

Badly underfinanced, he has raised about $175,000 in campaign contributions and lacked the resources to wage an expensive mass media effort. Instead, he has campaigned in a low-key manner hoping to pick up support from his appearances on television debates in the Baltimore and Washingtin areas.

Maryland Republicians, meanwhile, also are prepared to nominate a candidate for governor. But the minority party primary has been a quiet affair, partly because of the huge lead former U.S. Sen J. Glenn Beall, holds over his rivals, Louise Gore, Ross Z. Pierpont and Carlton G. Beall.

Tuesday's primary is the first chance Maryland Democrats will have to vote since the 1977 political corruption conviction of suspended Gov. Marvin Mandel, a popular chief executive who rolled up the largest plurality in state history just four years ago.

Mandel's preeminence as a candidate for governor in the past two elections removed any drama from the Democrat's gubernatorial primary. In fact, this year's race is the first truly competitive inner-party contest since 1966 when George P. Mahoney, a political maverick running on the slogan "Your Home Is Your Castle," defeated two better-known Democrats and then went on to lose the general election to Spiro T. Agnew.

The four contenders this year, while strikingly similar in their stands on many campaign issues, represent different wings of the state Democratic Party and offer the 1.4 million registered Democratic voters a clear choice of personal style and background as well as political philosophy.

"The election is kind of a referendum on the past 10 years (of numerous political corruption scandals," observed John Hanson Briscoe, outgoing speaker of Maryland's House of Delegates. "But is also a choice for the future. Do we want radical changes or a continuation of the same leadership?"

Lee, 62, a politician of moderate views who hails from an aristocratic Montgomery County family, served as Mandel's loyal lietutenant governor for seven years before assuming the powers of acting governor while Mandel was preparing for his second corruption trial in June 1977.

Relying heavily on Maryland's old line political organizations, Lee plans to spend up to $60,000 in "walk-around" money to pay for organization precinct workers on election day, his campaign also has attracted a sizable following of volunteers to augment work of the political pros.

A politician who admittedly feels more at home behind his desk than on the political stump, Lee, a stately silver-haired man, campaigns in a low-key manner. Before large groups, he emphasizes his experience as lieutenant governor and before that, state legislator.

"No matter what it is," he told members of the Brooklyn Boosters Club Friday night in South Baltimore, "whether you're running a hardware store or making steel, nothing works better than experience. And I know a doggone thing about state government."

As the best financed candidate, Lee's methods of raising nearly $750,000 have inspired controversy. In one case, he accepted large contributions and fund-raising aid from Maryland bankers who persuaded Lee to appoint their choice for state banking regulator.

Earlier in the campaign, Lee was criticized for his continued association with Mandel after it was disclosed that the convicted governor participated with State Senate President Stony H. Hoyer that ultimately resulted in Hoyer's decision to join Lee's ticket as a candidate for lieutenant governor.

Venetoulis, 44, a self-styled reformer who promises to "scrub down the walls" in a "New Maryland" cleansed of political favoritism and cronyism, has gradually gained strength with his "grassroots" volunteer organization and personal form of campaigning.

An energetic man who literally runs through neighborhoods shaking hands and bussing cheeks, Venetoulis, a short, portly politician with tousled salt-and-pepper hair, has cut out a respectable following among Maryland labor groups and young and liberal voters.

With his arsenal of colorful political code words and charismatic speaking manner, he moves large crowds of supporters by simultaneously attacking Lee as a remnant of the Mandel era and promoting himself as the prophet of a "new state with a sense of trust."

Bringing 800 applauding supporters to their feet at an Annapolis rally Thursday night, he said, "IF Blair Lee is elected governor, the state won't fall into disrepair; it will fall asleep." After the speech, he was mobbed by volunteers seeking autographs or a handshake while one supporter stood by fanning him with a straw campaign boater.

Despite his reform rhetoric and his "people's campaign," Venetoulis has amassed a fat treasury of nearly $500,000, including gifts from developers and contractors who seek work, zoning changes and building permits in his home county.

In recent days, Hoyer has stepped up the attack, accusing Venetoulis of "playing fast and loose with the truth" by lying about his age during his county executive's race in 1974 and misleading the press about the role of power broker Irvin Kovens in that elections.

Orlinsky, 40, a two-term president of Baltimore's City Council, was the fist candidate to articulate many of the issues aired in this campaign, such as a need for a better state transportation system and a more aggressive economic development program to attract industries to Maryland.

The flamboyant Orlinsky, who has a fiercely faithful, though small, following, also ignited some of the campaign's controversies by sharply attacking Venetoulis, whom he has called a "phony," and a "hypocrite."