Ventura Police Department officers had to negotiate with a man to get him to come down from the roof of a commercial building after he allegedly tried to hit an officer with his car.

Clay Allen, 28, was first contacted by officers when they responded to reports that Allen was disturbing customers in front of the Subway on 51 W. Main St., at 3:39 a.m., police said in a news release.

Allen, who was sitting in the driver’s seat of his car, “became uncooperative” with officers and appeared to reach for something, then started his car and ran into a large pillar, police said.

After the crash, Allen reversed his car, nearly hitting an officer, and led police on a pursuit until he collided with another vehicle, then fled on foot, police said.

Allen was found on the roof of a business on Wall Street, and he threatened to commit “suicide by cop” until an officer trained in crisis intervention negotiated for Allen to come down and surrender, police said.

Allen, who spent about 90 minutes atop the business, suffered a minor injury. No police officers were injured.

While Allen was atop the business, officers say they found a loaded gun in his car. They also say Allen has a previous felony arrest and is barred from owning firearms.

Allen was booked into Ventura County Jail on charges of assault with a deadly weapon on a peace officer, being a felon in possession of a firearm, possession of a stolen gun and possession of drugs while armed.