When William Donald Schaefer was governor, the nicest thing you heard about his predecessor, Harry R. Hughes, was that his dog ruined the rugs in the Governor's Mansion.But with a new governor in Annapolis, it's Mr. Schaefer who is in the doghouse and Mr. Hughes who enjoys a warm welcome.

Mr. Hughes has been named to the governing board of the University of Maryland System, while Mr. Schaefer can't get himself appointed to the board of a small rural college.

Such is the topsy-turvy nature of politics in Maryland.

After being unappreciated and downright criticized during the Schaefer years, former governor Hughes now has a friend in the State House.

Mr. Hughes' re-emergence on the political scene began last fall, when Parris N. Glendening, the Democratic gubernatorial nominee, engineered his chairmanship of the state Democratic Party.

Last week, Governor Glendening rewarded his friend -- and sometime "kitchen cabinet" adviser -- with a seat on the University Board of Regents. Yesterday, Mr. Glendening named

Mr. Hughes to the board of the Chesapeake Bay Trust, a nonprofit group that provides grants for environmental programs.

Mr. Schaefer has not fared so well under the new governor, who refused to appoint him to the St. Mary's College governing board. The reason? In Mr. Glendening's eyes, Mr. Schaefer is a potential political candidate because he has talked of running for mayor of Baltimore.

"He says I can't be on the board because I'm in politics," Mr. Schaefer fumed. "With [Maryland Congressman] Ben Cardin sitting on the board, I can't be because I'm in politics." (However, it was Mr. Schaefer, not Mr. Glendening, who appointed the congressman.)

It's no secret that Mr. Schaefer and Mr. Glendening are not chums. Although a Democrat, Mr. Schaefer never got around to endorsing Mr. Glendening's bid for governor, while Mr. Hughes was one of Mr. Glendening's earliest supporters.

"It doesn't surprise me at all, given the support that Harry Hughes gave to the Glendening campaign, that he is emerging as a figure as the result of this new administration," said Donald F. Norris, policy sciences professor at University of Maryland Baltimore County.

"Governor Hughes' personality dovetails more with Parris Glendening's than does Governor Schaefer's do-it-now approach," said Senate President Thomas V. Mike Miller Jr., a Prince George's County Democrat. "Mr. Hughes is quite thoughtful."

Mr. Glendening said he barely knows Mr. Schaefer, while "I know and trust Harry Hughes because I've known him for 25 years."

A much younger Parris Glendening met Mr. Hughes when Mr. Glendening was courting his wife, Frances Anne, whose maiden name coincidentally was Hughes. (No relation.)

Harry Hughes was a friend of her father, the late George R. Hughes Jr. The two men met as teen-agers at Mount St. Mary's College in Emmitsburg, where they were sent before embarking on Navy training, Harry Hughes recalled.

They met up again in 1955, this time in Annapolis. "He [George] had been elected to the House of Delegates from Allegany County as a Republican, and I had been elected to the House from Caroline County," Mr. Hughes said. In the intervening years they had both married women named Patricia.

Despite their different party labels, the delegates found they had JTC much in common and became good friends. "When Frances Anne was a little thing, they spent two weeks with us down at the beach," said the 68-year-old former governor.

The two men later moved to the Senate, but Harry Hughes stayed in politics and George Hughes left to become a tax court judge. George Hughes committed suicide in 1978, the same year his friend was elected to the first of two terms as governor.

Governor Hughes' eight years in office are perhaps best known for his environmental initiatives. Those efforts culminated in late 1983 when the states around the Chesapeake Bay and the federal government agreed to a major bay cleanup.