Abstract-In cognitive radio (CR) networks, due to the ever increasing traffic demands and the limited spectrum resources, it is very likely for several secondary networks (SNs) to coexist and opportunistically use the same primary user (PU) resources. In such scenarios, the ability to distinguish whether a licensed channel is occupied by a PU or by other SNs can significantly improve the spectrum efficiency of the network, while the contention among the SNs already operating on licensed channels with no PU activity, may further affect its throughput and energy efficiency. Therefore, the proper selection of licensed channels could result in notable performance gains. In this paper, we propose a novel contention-aware channel selection algorithm, where the SN under study: i) detects the licensed channels with no PU activity by exploiting cooperative spectrum sensing, ii) estimates the probability of collision in each one, and iii) selects the less contended to access. We provide a detailed analytical model for the throughput and the energy efficiency of the SN and we validate it by means of simulation. We also show the significant performance gains of our proposal in comparison with other relevant state-of-the-art algorithms.