This paper presents a reliable routing protocol for wireless ad hoc and sensor networks which is based on the DSR routing protocol. The protocol achieves increased reliability through the maintenance of a reliability factor by the nodes in the network. During the route discovery process, the request messages are only propagated to nodes with a reliability factor that is above a threshold value specified by the application. Selection among multiple possible discovered routes is done through the use of a normalized cumulative path reliability factor that is calculated by the destination. Different methods for the maintenance of the reliability factor by the nodes, as well as other optimizations to enhance network performance and reduce path discovery overhead are also presented.