ALBANY, N.Y. (AP) – An appeals court has reinstated the lawsuit by two men who claim the New York Police Department is illegally keeping their personal information and that of about 360,000 others who were stopped and frisked but whose cases were later dismissed.

The Appellate Division panel says a judge erred in dismissing the case and Clive Lino and Daryl Khan have legal standing to make injury claims since their unsealed records put them at “imminent risk” of stigma and being targeted by police in the future.

Both were stopped and frisked by police in 2009 and issued summonses that were later dismissed.

The midlevel court says Thursday that state lawmakers enacted provisions for sealing records to remove any stigma from criminal accusations.