In an Opportunistic Network (Oppnet), the transmission of messages between mobile devices is achieved in a store-carry-and-forward fashion since nodes store the incoming messages in their buffer and wait until a suitable next hop node is encountered that can carry the message closer to the destination. In such environment, due to the delay-tolerant nature of the network, designing a routing protocol is a challenge. This paper proposes a novel routing protocol called Encounter and Distance based Routing (EDR), which utilizes the so-called forward parameter to determine the next hop selection. This parameter is calculated by taking into account the number of encounters and the distance of each node in the network with respect to a particular destination. Simulation results are provided, showing the superiority of EDR over the Historybased Prediction for Routing (HBPR) protocol and the ProWait protocol, chosen as benchmark schemes, in terms of hop count, messages dropped, and average latency.