SOUTH PORTLAND, Maine — A Cape Elizabeth man was arrested on several felony charges after he allegedly threatened a taxicab driver with a firearm early Sunday morning.

Adam Stockley, 51, is charged with reckless conduct and criminal threatening, both of which are Class C charges punishable by up to 5 years in prison and a fine of up to $5,000, as well as Class B theft, which carries a maximum penalty of 10 years in prison and a fine of up to $20,000.

After his arrest, Stockley was taken to Cumberland County Jail, where he is being held on $25,000 cash bail, South Portland police Sgt. Steve Webster said Sunday morning in a news release.

The series of events that led to Stockley’s arrest began around 1 a.m., when South Portland police officers were sent to the area of 340 Sawyer St. to investigate a report that a cab driver had been threatened by a customer and that shots had been fired from a handgun, Webster said.

When officers arrived, they interviewed the victim and set up a perimeter around the area. Several spent shell casings were found in the roadway close to the taxicab that had been parked and abandoned by the driver, who ran from the cab because he was in fear for his life, Webster said.

During the investigation, officers located a man inside an apartment at 340 Sawyer St. who matched the description of the suspect and subsequently was identified by the victim, the sergeant said.

“The victim in this case was not injured and it is safe to say that alcohol played a role in this incident,” Webster said.

A search warrant eventually was served at the apartment and a handgun was recovered, he said.