In this paper a reliability based routing algorithm is proposed for wireless sensor networks achieving reliable packet transfer to base station with minimum energy. The link metric used for calculating the optimal path is related to the corresponding fading model (e.g. Rayleigh, Rice or any arbitrary fading model). The proposed scheme minimizes the energy consumption and ensures reliable packet transmission at the same time. Reliability is guaranteed by selecting the path over which the probability of correct packet reception at the base station will exceed a predefined threshold. While energy balancing is ensured by selecting the path which minimizes the energy consumption of the ldquobottleneck noderdquo (i.e the energy consumption of the crucial node, having minimal remaining energy in the routing path). It will be pointed out that reliable and energy efficient packet forwarding can be put down to a constrained optimization problem. By using a specific link metric, this problem can than be mapped into a shortest path problem solved in polynomial time. Thus the obtained results make possible reliable path selection with optimal energy balancing in real time.