A Portland police officer did not violate the rights of a New Hampshire man who was arrested after refusing to provide police with identification, a jury ruled Wednesday morning.

Arthur Long was arrested in August 2014 on Preble Street. Portland police, responding to a report of men drinking in public outside a bar, had demanded that Long produce an ID because they suspected him of being one of the people drinking. There were beer cans on the steps where Long was sitting, but he said he merely stopped there to chat on his way back to Deering Oaks to get his car and drive back to New Hampshire.

The man sitting with Long on the steps produced an ID and was let go with a warning. Long was arrested and taken to Cumberland County Jail when he refused to identify himself. He argued that he had done nothing wrong that could cause him to be suspected of committing a crime and therefore didn’t have to provide an ID.

He said the cans of beer on the steps did not belong to him and most were Budweiser, a brand he did not like.

In a federal lawsuit, Long said he was unlawfully arrested, police conducted an improper search by taking his wallet and going through it and excessive force was used when he was allegedly shoved from behind into the steps by Officer Brent Abbott. Long’s lawyer, Michael Waxman, had argued that police lacked probable cause to arrest him, and therefore the arrest and search were improper.

Long sought punitive and other unspecified damages.

Abbott said he acted properly and the five-man, three-woman jury deliberated for about an hour before siding with Abbott.

“I’m just glad it’s over,” Abbott said after the verdict. Abbott said that he had arrived at the scene anticipating that no arrest would be made. Normal procedure for cases in Portland involving people drinking in public is to take the offender’s name and make an arrest only in those instances in which the offender breaks the law again within a year.

But after Long refused to give his name – so officers could check to see if he had been warned before – Abbott said he arrested him under a Maine law that requires suspects to provide accurate identification to police.

Long, who worked for several Maine police departments and was a volunteer reserve police officer in Portland for 3½ years, said that experience made him aware that people should be required to provide identification only if they are suspected of breaking the law. He said after the trial that he regretted that the situation nearly three years ago “evolved” into an arrest.

Abbott has not been accused of using excessive force before, said Jessica Grondin, a spokeswoman for the city of Portland.

If the jury had found in favor of Long and awarded damages, the city would have paid, she said.

Long was never prosecuted on the charge that resulted in his arrest.

The trial was held in federal court because it involved a question of constitutional rights.