PORTLAND, Maine — The city council agonized Monday night over the roughly $70,000 decision to eliminate the job of the mayor’s assistant, even as it voted to approve the $345 million annual budget.

The 6-to-3 vote to cut the position landed as a heavy blow to Mayor Ethan Strimling, who said his “office will fail” without it, and lead him to oppose next fiscal year’s budget, which nevertheless was approved 8-to-1.

“This body chose a budget that undermines my ability to do my job,” Strimling said before voting against the combined city and school budget.

The mayor had made an impassioned plea to save his assistant’s job, which he presented as necessary for city government to function. “This was not about $69,000. This was about our democracy,” he said.

But several councilors sharply rebuked the mayor, suggesting he has done too little to work with his colleagues on the council and build policy consensus.

“I feel as though you are on an island by yourself, and I firmly believe that this position has made it worse,” Councilor Spencer Thibodeau told Strimling, jabbing a finger into the dias for emphasis. “You need this council. Come back to this council.”

Throughout the meeting, Jason Shedlock sat at the front the council chamber’s public seating area, listening quietly to the emotional debate and unusually vitriolic public comment over eliminating his job. When Shedlock, who was hired for the newly created position last March, eventually rose to speak, he offered a measured defense of his position, noting the degree to which the mayor relies on him and listing examples of how he has aided Portlanders.

Shedlock said that listening to the public comments was like “watching one’s own funeral.” During his remarks, several lights in the room momentarily went out.

He declined to comment after the vote.

The budget amendment to eliminate Shedlock’s position was brought forward by Councilor Belinda Ray, who said she originally opposed creating the job and promised her constituents she’d consider eliminating it after a year.

The mayor was joined in voting against Ray’s amendment by the two newest city councilors, Pious Ali and Brian Batson. But the majority of council members felt the post was a poor use of taxpayer money and unnecessary, though they stressed that cutting the job had nothing to do with Shedlock’s performance.

Sheldock would have been paid about $70,000 plus benefits in the next fiscal year, only slightly less than the mayor, whose salary will be $73,000. Strimling is the second mayor to serve since the city charter was amended in 2010 to make the position directly elected and full time. His predecessor, Michael Brennan, did not have an assistant.

“This position has been a lightning rod in the community,” Councilor Nicholas Mavodones said.

Several Portlanders spoke against cutting the job, suggesting it was political payback against Strimling, who recently clashed with the other council members and City Manager Jon Jennings.

Progressive Portland founder Steven Biel said it was the “most petty and nasty thing I have seen the council do.” Bayside resident George Rheault referred to Ray and her amendment as a “little baby bird eating some regurgitated food from the city manager.”

Councilors dismissed the idea that cutting the job was a jab at Strimling. Several noted that, like Ray, they had misgivings about the position a year ago, when Jennings created it.

It was not immediately clear when Shedlock’s last day would be. Funding for his job runs through the end of the fiscal year June 30, but the city’s head of human resources said employees whose posts are eliminated through the budget are typically given three months notice or three months pay.