<p>Energy efficiency is one of the main issues that will drive the design of fog-supported wireless sensor networks (WSNs). Indeed, the behavior of such networks becomes very unstable in node’s heterogeneity and/or node’s failure. In WSNs, clusters are dynamically built up by neighbor nodes, to save energy and prolong the network lifetime. One of the nodes plays the role of Cluster Head (CH) that is responsible for transferring data among the neighboring sensors. Due to pervasive use of WSNs, finding an energy-efficient policy to opt CHs in the WSNs has become increasingly important. Due to this motivations, in this paper, a modified Stable Election Protocol (SEP), named <em>Prolong-SEP (P-SEP)</em> is presented to prolong the stable period of Fog-supported sensor networks by maintaining balanced energy consumption. P-SEP enables uniform nodes distribution, new CH selecting policy, and prolong the time interval of the system, especially before the failure of the first node. P-SEP considers two-level nodes’ heterogeneities: advanced and normal nodes. In P-SEP, the advanced and normal nodes have the opportunity to become CHs. The performance of the proposed approach is evaluated by varying the various parameters of the network in comparison with other state-of-the-art cluster-based routing protocols. The simulation results point out that, by varying the initial energy and node heterogeneity parameters, the network lifetime of P-SEP improved by 31, 29, 20 and 40 % in comparison with SEP, Low-Energy Adaptive Clustering Hierarchy with Deterministic Cluster-Head Selection (LEACH-DCHS), Modified SEP (M-SEP) and an efficient modified SEP (EM-SEP), respectively.</p><div></div>