Maryland Gov. Harry Hughes, seeking to avoid a potentially embarrassing election-year showdown with legislators, today proposed delaying by six months the start-up of Maryland's controversial automobile inspections program.

Hughes--who pushed the program through the General Assembly three years ago and defended it as late as last week--explained his flip-flop by citing the legislature's drive to repeal the program and "uncertainty" over whether Congress will change pollution laws.

The program would require motorists in Baltimore and seven Maryland counties to pay $9 each year to have their car exhausts inspected. Deregulation-minded legislators argued that the Reagan administration is unlikely to penalize states for failing to create emissions programs. Also, they believe Congress soon will weaken federal clean-air requirements.

To head off the repeal drive, Hughes and legislative leaders had been drafting a compromise measure to cut the cost of inspections for taxpayers. But in a slap at them last week, budget committees in both the House and Senate voted to strip all state money for the program.

Under the governor's amendments, the program would be delayed well past the election, until July 1983.

"There was a feeling that under the pressure of an election year, the legislature was most likely to repeal the program," said Norm Silverstein, the governor's assistant press secretary. "It was an effort to save the program, to keep it from getting ripped in an election year."

Most legislators opposing the program today appeared willing to accept the delay and scrap their repeal effort. "I think he the governor has come back to reality," said Sen. Harry J. McGuirk (D-Baltimore), a consistent Hughes critic.

Sen. Norman R. Stone Jr. (D-Baltimore County), author of a repeal bill, agreed with House Speaker Benjamin L. Cardin (D-Baltimore) that the delay is a "fair" compromise.

But the delay poses some risks. The EPA still is obliged by law to impose sanctions against states that do not comply with the inspections requirement. In Maryland that could mean more than $200 million in federal highway funds. EPA press spokesman Byron Nelson in Washington said, "Unless Congress changes the law, Maryland would be in violation in January 1983. The law is the law."

Also, the state has signed a contract with Systems Control Inc., a Palo Alto, Calif., firm, to set up the state's inspections stations and the firm already has spent more than $3 million. It was unclear today how much the delay would cost the state.

Hughes' press spokesman Silverstein said the delay was based partly on recent public remarks of EPA Administrator Ann Gorsuch, who in a Denver speech seemed to signal a reluctance to impose sanctions. But the EPA press spokesman disagreed, saying, "On the one hand, we wear the hat of the Reagan administration hoping the law will be changed." But, he said, "Ann Gorsuch has never expressed reluctance to do her duty as administrator of EPA."