Most of wireless sensor networks (WSNs) are deployed in an environment where communication between sensors may be monitored. For applications which require higher security, it is therefore necessary to employ some cryptographic scheme in the network. However, key management in WSNs is a challenging task due to the constrained resources. In this paper, based on the concept of small worlds, we present a group-based key predistribution scheme which enables any pair of sensors to establish a unique shared key. The key path establishment uses only local information with logarithmic memory overhead to the number of groups. Other performance, including communication and computing overhead, are evaluated also. The results show that the proposed key management method performs better than other known methods.