This paper presents a new basic clustering algorithm to increase the wireless sensor networks energy and longevity, efficiently. In each period, cluster heads are selected based on the maximum energy and the minimum distance through the nodes. Therefore, the protocol to obtain good performance in terms of longevity is achieved by balancing the energy load among all nodes. The simulation results obtained from the MATLAB software indicate that the suggested approach is effective in prolonging the network longevity.