ABSTRACT Network Coding (NC) is an emerging technique that helps wireless networks to have higher throughput and better energy efficiency. In this paper, a novel network coding-aware routing (S-NC) which uses NC to improve reliability and robustness in unreliable WSNs is proposed. It is based on a structure-free routing algorithm as the underlying routing engine which employs neighbor queue length to increase coding opportunity; while exploiting a spatial coding method to control the amount of redundancy. To the best of our knowledge, this is the first study on the topic of network coding-aware routing in WSNs. Simulation results in TOSSIM demonstrate that S-NC significantly improves the performance in terms of reliability, end-to-end delay, and energy consumption in the network.