After becoming mayor in 1967, Thomas J. D'Alesandro III put Mr. Hartman in charge of overseeing the city's legislation before the General Assembly in Annapolis.
"He was one hardworking lawyer and the kind of guy I always gave the tough cases to because I realized the job would be well done," Mr. D'Alesandro said last week.
"When I was mayor, I always relied on his recommendations. He would deliberate and never made off-the-cuff decisions. He was wedded to the law," he said.
"Andy was a quiet man. Solid. No razzmatazz," Mr. D'Alesandro said. "And I can't stress how much I respected his knowledge of the law."
From 1968 to 1974, Mr. Hartman worked for George L. Russell Jr., who was city solicitor and is now a lawyer in private practice.
"We were partners, and Andy was an incredibly intelligent man who retained all of the institutional law," Mr. Russell said. "He was an extremely hard worker and a very kind person who was especially kind to young lawyers."
Mr. Russell recalled those years when he and Mr. Hartman were working together on difficult cases for the city.
"However, those years I spent with Andy were the most enjoyable of my career," he said. "He was very loyal and made the road easier."
During his years with Mr. Russell, a private civil dispute arose over air rights. The dispute had just ended with an agreement to lease the space above a downtown building, which the city had decided to tax.
Mr. Russell told The Sun that "Air is free unless you sell it," and it became Mr. Hartman's task to sell that legal concept to the Court of Appeals.
"He won," Mr. Russell said.
During his lengthy legal career, Mr. Hartman worked for three attorneys general, five city solicitors and six mayors.
Former Mayor Kurt L. Schmoke recalled Mr. Hartman as a "fine lawyer and an even better human being."
Mr. Schmoke, who had first met Mr. Hartman as a young lawyer, later became his boss.
"He had a great sense of humor when it came to that," Mr. Schmoke said.
"There was only one time when I heard Andy speak about his career trajectory as deputy city solicitor. He said, 'Always a bridesmaid, never a bride,' " Mr. Schmoke said.
City Councilwoman Mary Pat Clarke, a former City Council president, said that Mr. Hartman was "very much of the old school."
"He made his job his life, which was a benefit to all of us," Mrs. Clarke said. "He was a very steady guy and well-regarded.