A clustering algorithm is a key technique used to increase the scalability and lifetime of the Wireless Sensor Networks (WSNs). In this paper, we propose and evaluate a distributed energy-efficient clustering algorithm for heterogeneous WSNs, which is called Equitable LEACH-E (ELE). This protocol is an improvement of LEACH-E. In ELE, the cluster-heads are elected by using probabilities based on the ratio between residual energy of each node and the remaining energy of the network. Moreover, it uses a 2-level hierarchy by selecting a cluster head for data transmission. Simulations show that the proposed algorithm increases the lifetime of the whole network and performs better than LEACH and LEACH-E.