Gambling and prostitution were illegal in California after 1855. However, law enforcement throughout America and especially in the West saw these vices as impossible to eradicate. Special "restricted" districts were created in many cities where the vices were tolerated so long as they were kept within the boundaries of the district and that there were no greater crimes involved. Illegal payments from the vice trade to the police were also typical components of these bargains. The Stingaree, like the more famous Barbary Coast in San Francisco, was one of these districts.