—The paper presents a novel integrated MAC/routing scheme for wireless sensor networking. Our design objective is to elect the next hop for data forwarding by minimizing the number of messages and, at the same time, maximizing the probability of electing the best candidate node. To this aim, we represent the suitability of a node to act as the relay by means of locally calculated and generic cost metrics. Based on these costs, we analytically model the access selection problem through dynamic programming techniques thereby devising the optimal access policy. We subsequently derive a contention-based MAC and forwarding scheme, named Cost and Collision Minimizing Routing (CCMR). Both analytical and simulation results are given to demonstrate the effectiveness of our technique by comparing its performance against state of the art solutions.