NEW BRUNSWICK, N.J. (AP) — A Middlesex County man cleared of a conviction that landed him in prison for three years over a BB gun is suing the state for damages, which could pay out upwards of $150,000.

The wrongful conviction lawsuit was filed on Dec. 14 in Middlesex County Superior Court after the state appellate court ruled the case against 30-year-old hinged on warrantless search.

NJ.com (http://bit.ly/2iahTx2) reports that Jason Patterson’s suit stems from a traffic stop in Metuchen in 2008, when the then 22-year-old who had abruptly stopped at a yellow light and ended up “a little past the intersection,” the court papers say.

Police ran Patterson’s plates and pulled him over on Dec. 1 for driving his Jeep, which had a faulty driver’s side window, with a suspended license from an unpaid municipal fine, records show.

According to court papers, Patterson told the officer about the broken window and that one of them would have to open the door. Once the officer did, he said he spotted a “few flakes” of what he thought was marijuana and a shoelace tied in a way that looked like it had been used to shoot up. Police said they saw another syringe when Patterson got out of the SUV.

Patterson was arrested and admitted there were additional syringes and drugs in the Jeep, according to records. The officers then searched the entire Jeep finding seven syringes and 12 folds of heroin, as well as a BB-gun in the rear cargo area, tucked below a mat where the spare tire was stored.

Two years later, Patterson was convicted on a weapons charge and sentenced to three years in prison, with another three years of probation, state records show. Just before the trial, the state dismissed all of the drug charges.

In December 2014, the Appellate Division of the Superior Court of New Jersey overturned the conviction after Patterson had served his full three years in prison.

The appellate court ruled that anything found during the search, which the officers later said was to “protect the safety of others” before being towed, should have been inadmissible, except for the items in a visible area.

“Nothing needed to be done to prepare the car for towing,” the ruling reads.

In the unpublished decision, the court ruled the officers should have gotten a warrant before the search, which happened during normal business hours “just feet from the police department.”

Patterson’s lawyers had originally filed to suppress the evidence found during the search, but his motion was denied.

The lawsuit includes reference to his Tort Notice of Claim seeking $150,000, court costs and lawyer fees, as well as any other relief deem appropriate by a jury citing state law.

In 2013, Gov. Chris Christie signed a law increasing the limit of damages someone who was wrongfully convicted can receive to $50,000 for each year in prison. Under the law, the person can is also entitled to non-monetary relief, including tuition assistance, counseling, housing assistance and health insurance.

Calls to Patterson’s attorney were not returned. His indictment was vacated in on Aug. 15, 2015.