Maryland Gov. Harry Hughes today replaced his longtime press secretary, Lou Panos, a move that some sources close to his administration said was the beginning of a staff shake-up to reverse the governor's flagging political fortunes.

Panos, 60, was reassigned to a newly created post as director of a "statewide Maryland information office" and was replaced by M. Hirsh Goldberg, a 43-year-old executive of a Baltimore advertising firm and one-time press secretary to former Baltimore mayor Theodore McKeldin.

Panos is a former writer with the Baltimore Evening Sun who joined the Hughes administration in 1981 in a reshuffle that was intended to improve the governor's relations with the press.

The sources said that Hughes' professional political advisers -- who are grooming him for an expected campaign for U.S. Senate this year and playing a growing role in the administration -- had become unhappy with how the governor's handling of the savings and loan crisis was portrayed in the press. Last fall, the governor became the focus of virulent and highly publicized attacks by savings and loan depositors and was criticized for ignoring an October 1984 memo warning him of impending problems in the thrift industry.

Despite the public relations hammering, Hughes remained essentially closeted in his office as he went three months without a formal news conference and few public appearances.

"It was not so much dissatisfaction (with Panos), but a feeling that with the savings and loan problem a different style was necessary, someone with a little more experience with politics," said one source familiar with events leading up to Panos' replacement.

Both the governor -- in a written statement -- and Panos said that the decision to leave the press secretary's post was voluntary. Panos said he had been looking for another government post and that the new position, which is designed to coordinate public information among cabinet-level departments and between them and the executive staff, was his own idea.

In his new position, Panos will work out of an office in Baltimore.

"Everyone on the second floor (of the State House) has become a paper shuffler at this point," said another source familiar with executive staff operations. "It's the campaign that has taken over day-to-day operations. Running government is not the number one priority now, it's the salvation of the image."

One Baltimore political figure who knows him predicted today that Goldberg, who once served on the Democratic Central Committee in the 42nd Legislative District of Baltimore, will be amenable to the goals of Hughes' political advisers. Goldberg "doesn't have the stature to raise a fuss," he said.

Panos, who had his share of critics in the press and legislature, was portrayed in some quarters today as an unfortunate victim of senatorial politics.

Said one legislator: "The governor crawled into his shell for three months and Panos is supposed to take the fall for that? It isn't something you do to a guy like that. He's somebody you take care of rather than ship out in the middle of an election campaign."