Police seized my car how do I get it back?

I recently bought a car in California, but a week after the purchase, the police arrived with a warrant and seized the vehicle. The warrant pertains to the previous owner, not me. The police won’t disclose why they took it, only stating that it could be a year or more before I get the car back.

I bought the car from a licensed dealership, not directly from the previous owner. The dealership claims they acquired the car legally and that it’s not their problem. My insurance company says I need to deal with the police.

I paid over $6,000 for the car, and now I need either the money back or the car returned. What can I do if the police, the dealership, and my insurance refuse to help? I’ve never experienced anything like this and am feeling lost. Any advice would be greatly appreciated.