A New Hampshire man who alleges that a Portland police officer violated his rights, wrongly arrested him and used excessive force against him on Preble Street nearly three years ago is getting his day in court.

The trial in Arthur Long’s lawsuit against the officer, Brent Abbott, opened Tuesday in U.S. District Court in Portland.

Long said he was sitting on a stoop in front of a Preble Street building in August 2014, talking with another man, when Abbott and another Portland officer drove up and demanded his identification.

Long, himself a former police officer who also spent time as a volunteer reserve officer with the Portland Police Department, told Abbott he didn’t need to identify himself because he had done nothing wrong. But Abbott told him they were responding to a complaint about drinking in public and continued to demand to see Long’s ID.

When Long refused, Abbott said, “Oh, we’ve got a wise guy here,” according to Michael J. Waxman, Long’s attorney.

“Let’s see some ID or you’re going to jail,” Abbott allegedly told Long, Waxman said in his opening statement Tuesday morning.

When Long would not provide his ID, Waxman said, Abbott told him to stand, turn around and put his hands behind his back. Then, Long contends, Abbott shoved him onto the steps. Long’s suit also said that Abbott and another officer conducted an unconstitutional search of his wallet.

Waxman said that the arrest was unwarranted because Long wasn’t sitting near any of the beer cans on the stoop and the nearest sign warning against public drinking was more than 400 feet away. City ordinances specify that someone can be arrested for public drinking only if a sign saying it’s illegal is within 200 feet of the spot where the drinking allegedly takes place.

Waxman added that the beer cans on the stoop where Long was sitting were cans of Budweiser beer, which Long doesn’t like.

John J. Wall, Abbott’s lawyer, told the eight-person federal jury hearing the case that his client had probable cause to believe that Long was drinking in public and Long could not be sure that Abbott shoved him, since he was facing away from Abbott at the time he was shoved.

Wall said Abbott had been a police officer for 12 years at the time of the incident with Long, and had been on the force in Portland for four years at the time.

Long suffered minor injuries when he hit the steps, Waxman said. The suit seeks compensation for those injuries, along with unspecified punitive damages.

The trial is expected to be completed Wednesday.