By his estimation, Robert Hains of Portland has been trying to keep the City Council on-point for the last 40 years.

He has challenged an ever-changing cast of councilors on technical and sometimes-obscure details of everything from the city’s roughly $225 million budget to real estate transactions and council procedures. His institutional knowledge has often surpassed that of the city’s staff and elected officials.

On Monday night, Hains announced that he is retiring from the council chambers, giving up his role as council gadfly.

“I’m going to try to take up a new hobby,” Hains said during his final council meeting.

Most cities and towns have someone like Hains – a resident who attends virtually every council meeting, asking questions and offering opinions on various issues. Even among this exclusive group, Hains, 73, is a rare breed, given his longevity, thoroughness and deep knowledge of the issues.

Hains would often pull a chair out of a stack and put it near a wall in the council chambers, sitting apart from most of the audience. He would periodically step up to the podium to make a point, speaking deliberately through a full gray beard and looking over his reading glasses at the councilors.

Sitting next to him would often be his comrade, Steven Scharf, who has been attending meetings for nearly 15 years. The two were not unlike Statler and Waldorf, the older characters in “The Muppet Show” who sit in the balcony, commenting on the show unfolding before them.

Scharf said Hains provided more detailed feedback, while he sticks with the big picture.

“I think it’s important that the council not be unchallenged in most of what it does, and without Bob and I, there would be issues that would fly through the council without any discussion, and that’s not good government practice,” he said. “Bob’s viewpoint and level of review will be missed.”

Joseph Gray, whose career at City Hall spanned 40 years including 10 as city manager, was surprised to learn that Hains is calling it quits. He applauded his work ethic, and his respectful manner when addressing the council.

“We have had some people take an interest in City Hall over the years who were very argumentative and cynical in their comments, but that wasn’t the case with Robert,” Gray said. “While you may not always agree with him, you have to give him respect for taking the time to research the issue so the council had what he thought were important questions to consider. I’m sorry to see him leave.”

The weight and attention councilors gave Hains’ points varied by the issue and the lateness of the hour when Hains rose to speak, but his announcement Monday night did not fall on deaf ears. Councilors gave him a warm round of applause.

“I actually think that watchdog role is a great public service,” Councilor Jon Hinck said Monday.

A BACKGROUND IN NUMBERS

Hains was born and raised in Waterville and graduated from the University of Miami with a degree in business administration and a concentration in accounting. After college, he worked for several years with the U.S. Census Bureau. He said he collected financial employment data from 46 of the 50 states, flying only once in the four-year period and instead opting to drive. He later gained experience with land deeds while working on real estate taxes.

Those experiences, and his background in real estate investing, proved useful for tackling issues of municipal government, whether it was tax breaks for businesses or bonding large capital projects.

Hains began attending Portland City Council meetings shortly after he bought his first investment property, a multi-unit residential building on Cumberland Avenue that had suffered from decades of neglect. He went to his first meeting to protest a threatening note left by a city inspector, who had apparently gone back on his word that Hains would be given more time to bring the building up to code.

“That got me angry, so I started going to council meetings,” Hains said in an interview Tuesday. “It just sort of evolved into this hobby. I have gotten deep into it. I felt if they were doing this to me, what were they doing to other people? I know most people are afraid to speak, but I have a thick skin.”

Hains, who has served on city panels, ran unsuccessfully for the City Council and the state Legislature more than a decade ago.

LESS TIME TO SPEAK

A lot has changed since Hains started going to council meetings. At the beginning, he said, meetings were broadcast on radio and residents were allowed to comment on as many agenda items and for as long as they wanted. Now, Hains, a self-described paper-pusher in an increasingly digital world, laments that people who address the council are limited to three minutes each for a maximum of three issues, though the council regularly grants extensions.

Hains describes himself as fiscally and socially moderate. He said he left the Democratic Party because he believed it became too liberal after Joe Brennan was governor. Hains is now a Republican, but he said it took him years to gain the party’s trust because of his relatively liberal views.

“Most people you talk to are fiscally moderate, but the council doesn’t vote that way,” Hains said. “Getting value from something given is important. Just giving money away just drives me up a wall.”

Hains said he could tell when councilors were actually listening to him. Deep down, he knows he made a difference, even though many councilors may be loath to admit it.

“I like to say that I put out a suggestion, wait four or five years, and someone on the council will come up with this brilliant idea and it sails through and it’s same thing I said years ago,” Hains said.

RAISING IMPORTANT POINTS

Former City Councilor Cheryl Leeman said she got to know Hains 30 years ago, when he was a member of the Portland Taxpayer’s Association, which was formed in response to a citywide property revaluation. She credited him with helping to ensure that important points buried in the council’s thick packet of meeting materials got addressed.

“There were times people would say, ‘Oh my, I didn’t see that in there,’ ” said Leeman, who stepped down from the council last year after three decades. “It’s always good to have checks and balances in the system and have someone else who is willing to pay attention and sit through the meetings. A lot of people watch at home and react to an issue, rather than be out in front on an issue like Bob was. It’s better to have that input upfront rather than after the fact.”

Hains has religiously attended council meetings, which are held at least twice a month, as well as council workshops and some Planning Board meetings.

He said he’s looking forward to not planning his vacations around meetings. He’s looking forward to pursuing other hobbies, such as traveling with his fiancee.

Hains said he is encouraged by the hiring of Jon Jennings as city manager, because of Jennings’ business experience.

“He brings a perspective that’s much closer to mine,” Hains said. “One of my fears is, he’s going to burn out and he won’t be here long enough to have a good effect.”