Former Maryland congressman Edward A. Garmatz, a Democrat who represented his Baltimore district for 25 years before retiring in 1972, died at his home in Baltimore last night of lung cancer. He was 83.

Six years after his retirement, Mr. Garmatz was the defendant in a celebrated bribery conspiracy trial in which he was accused of accepting $4,000 from shipping companies hoping to influence 1971 legislation that eventually earned them handsome profits. The charges against him were thrown out of court after the Justice Department said it had discovered its key witness had lied to a grand jury and forged documents.

Mr. Garmatz had headed the House Merchant Marine and Fisheries Committee for six years before leaving Congress and was an expert on maritime matters dear to many of his constituents, who worked for the Baltimore port.

After his retirement a new federal courthouse in Baltimore was named for him. It was in that building that he was later indicted and the case against him fell apart.

Mr. Garmatz retired as the dean of his state's congressional delegation after reapportionment placed him in the same district -- the 3rd -- as another popular Maryland Democratic congressman, Paul Sarbanes, who went on to win the 1972 election. Sarbanes was elected to the U.S. Senate in 1976 and reelected four years ago.

Mr. Garmatz told a reporter for The Washington Post when he retired that he wasn't afraid of losing. "You get tired," he said. "You are out to dinner three or four nights a week. On Saturday and Sunday you've got chicken dinners, crab feasts, oyster roasts, bull roasts, combination feasts, weddings, bar mitzvahs, Polish Day, Lithuanian Day, Columbus Day, Veterans Day . . . . You name it. I've gone to it."

An electrician by trade, Mr. Garmatz worked his way thrugh the dominant political organization in East Baltimore and was rewarded in 1947 with an appointment to fill the unexpired term of Thomas D'Alesandro Jr., who had just been elected mayor of Baltimore.

Frank Lidinsky, Mr. Garmatz's attorney, told The Associated Press that the former congressman had been seriously ill since the beginning of the year and had been released from Johns Hopkins Hospital on July 1.

"I think he will be remembered for his constituent services," Lidinsky said. "People he helped 20 or 30 years ago always stopped to thank him."

Survivors include his wife Ruth and his sister, Elizabeth, of Washington.