Modern mobile phones and PDAs are equipped with positioning capabilities (e.g., GPS). Users can access public location-based services (e.g., Google Maps) and ask spatial queries. Although communication is encrypted, privacy and confidentiality remain major concerns, since the queries may disclose the location and identity of the user. Commonly, spatial Κ-anonymity is employed to hide the query initiator among a group of Κ. users. However, existing work either fails to guarantee privacy, or exhibits unacceptably long response time. In this paper we propose MOBIHIDE, a Peer-to-Peer system for anonymous location-based queries, which addresses these problems. MOBIHIDE employs the Hilbert space-filling curve to map the 2-D locations of mobile users to 1-D space. The transformed locations are indexed by a Chord-based distributed hash table, which is formed by the mobile devices. The resulting Peer-to-Peer system is used to anonymize a query by mapping it to a random group of Κ users that are consecutive in the 1-D space. Compared to existing state-of-the-art, MOBIHIDE does not provide theoretical anonymity guarantees for skewed query distributions. Nevertheless, it achieves strong anonymity in practice, and it eliminates system hotspots. Our experimental evaluation shows that MOBIHIDE has good load balancing and fault tolerance properties, and is applicable to real-life scenarios with numerous mobile users.