Power system decentralization has been an emerging topic for the past decade in an effort to improve power quality and environment protection via the increased integration of renewable energy sources. Toward these objectives, decentralized microgrids have been proposed and thoroughly investigated in terms of technical capabilities and economic performance. In fact, the planning and actual operation of small-scale, decentralized microgrids have started in countries, such as Canada, Japan, USA, U.K., and other countries. It is expected that the research in this area will progress and eventually take over the existing paradigm of large-scale power generation in the future. These small-size decentralized microgrids could be connected with nearby microgrids under normal operating conditions, but under special events, such as natural or man-made disasters, they would be disconnected and run in an islanded mode. Under such a high impact, low probability events, the microgrid must have the resiliency to successfully reconnect with other microgrids and the main grid. In this paper, an energy management system (EMS) for a microgrid having a resiliency function, allowing to operate under the islanded mode after an accident, is proposed. The proposed tool, called Resilient Energy Management System (ResEMS), aims at procuring reserve power into the microgrid's battery energy storage system (BESS) effectively, by importing it from the nearby connected power system. The quantity of power to be imported is decided considering the value of the load, photovoltaic device generation, and the state of charge (SOC) of BESS. The accident is assumed to be a predictable natural disaster, which means that the accident occurrence date or time period can be estimated. The proposed ResEMS has been applied to a microgrid comprising of a BESS, a diesel generator, and several photovoltaic devices. The simulation results verify its beneficial operation. INDEX TERMS Energy management system, reserve power, resiliency, battery energy storage system.