BANGOR, Maine — With his service weapon secured at his hip, Bangor police Officer James Dearing cast his vote Tuesday afternoon, four days after he was turned away by an election official for refusing to leave his gun behind.

Dearing, who was detailed to the Bangor Civic Center on Tuesday, said he was a little embarrassed that his story has gotten so much publicity.

“I was just happy to be able to vote,” he said.

The veteran officer first tried to vote last Friday while he was on duty. He went into the civic center, armed and in uniform, and was told by election warden Wayne Mallar that he would have to leave his firearm with another officer who was on duty there.

Dearing refused and said officers are trained never to relinquish their guns for any reason. Mallar maintained that his decision was based on ensuring the safety of other voters.

On Monday, Bangor City Clerk Patti Dubois said Mallar would not be working the remainder of this election season. His long-term status as an election warden has not been determined.

Also Monday, Police Chief Ron Gastia said he was proud of the way Dearing handled himself last Friday and defended the officer for voting while on duty.

Secretary of State Matthew Dunlap said there is no state law that says officers or anyone else must turn over their weapons when voting. He said Mallar should have called either the city clerk or the Secretary of State’s Office before making his decision.

Dunlap couldn’t remember an incident like this ever happening in Maine.