Energy is a key-resource to economic development and is required to be available continuously and in adequate amounts. Also, it is expected to be affordable and environmentally friendly. Ensuring this is a challenge, yet strategic to maintain economies running under a sustainable pattern. Energy security is neither a new concept, nor a new concern. However, because of new issues, it requires a novel, broader approach. Such an approach should address both demand (security of supply) and supply (security of demand) sides, as well as take into account energy scarcity situations and surplus opportunities. In addition, it should allow for both private (markets) and public (policies and regulations) initiatives. This paper presents a theoretical and practical basis for the economics of energy security. Energy security is defined, in this context, as the ability of an economy to provide sufficient, affordable and environmentally sustainable energy services so as to maintain a maximum welfare state, even when issues would press it otherwise. We introduce the notion of energy security gap to represent the economy's failure to show such ability. Additionally, we also propose a framework to support the evaluation, planning and implementation of energy security in an economy. This framework relies on the concepts of resilience, adaptability and transformability (Walker et al, 2004) to prescribe indicators to assess the energy security of an economy. Furthermore, it proposes mechanisms to enhance energy security, as well as a continuous process to increasingly achieve this.