In wireless sensor networks (WSNs), due to low cost, limited resource, and large scale, symmetric key-based key pre-distribution schemes are considered to be very suitable, but they cannot thoroughly solve authentication problem and resilience problem against physical capture. So, some researchers attempt to improve the traditional public-key cryptography to meet security requirements of the WSNs. In this paper, at first, to create the hybrid network model, the number range of cluster heads is determined according to the change of the average path length with the probability that the nodes are selected as the cluster heads. Next, based on the characteristics of the hybrid WSNs, a novel security mechanism is proposed by making use of the advantages of the symmetric cryptography and asymmetric cryptography. Our scheme can provide different security mechanism for the vital link and the ordinary link, respectively. In order to balance the energy consumption over all nodes, a selecting cluster head algorithm is proposed to rotate periodically cluster heads among all nodes and to compute the optimal number of times transmitting data per round. At last, our experiment shows that our scheme not only can provide sufficient security but also have the lowest energy overhead and the perfect connectivity. Copyright © 2013 John Wiley & Sons, Ltd.