MATTAPOISETT — The man who sparked an hours-long manhunt on Tuesday in Mattapoisett was found to be in possession of five rifles at the time of his arrest, according to police.

Mattapoisett Police Chief Mary Lyons says Joshua Farney, 23, of 118 Acushnet Road, was ordered held on $2,000 cash bail at his arraignment Wednesday in Wareham District Court. Farney faces five counts of possession of a firearm without a license, five counts of improper storage of a firearm, unlawful possession of ammunition, discharging a firearm within 500 feet of a building, and domestic assault and battery.

Chief Lyons says the charges stem from Tuesday night's search for a possibly armed suspect, which began as a domestic incident in New Bedford. Police in New Bedford notified Mattapoisett Police at about 6 p.m. of the incident in their town after the female had reported it to New Bedford authorities.

A welfare check performed by a relative on Farney at his home on Acushnet Road revealed he was making threats to harm himself and others, including law enforcement, and shot a rifle into the air.

The gunshot was reported to Mattapoisett Police by the relative while Farney fled into the woods near his home.

He later returned to the home, where he was arrested in a bedroom by SWAT officers from the Southeastern Massachusetts Law Enforcement Council. The arrest was made at about 11:10 p.m.

Police seized five rifles from the home. None of the rifles belonged to Farney, who did not have a license to possess firearms.

The search involved the SEMLEC SWAT team, the Massachusetts State Police Airwing Unit, and the police departments of Fairhaven, Mattapoisett, Marion, Acushnet, and Rochester. Residents near the focal point of the search area around Acushnet Road and Crystal Spring Road had been ordered to shelter in place during the five-hour search.