A system for controlling power distribution between a renewable energy source (RES) that generates electrical power, a power grid, an energy storage system (ESS) coupled to and configured to store electrical power from the RES and the power grid, and a behind-the-meter (BTM) load coupled to and configured to receive electrical power from the RES, the ESS, and the power grid includes a controller. The controller includes a processor and a non-transitory computer readable storage medium comprising instructions stored thereon that, upon execution by the processor, cause the controller to determine a prioritization mode and control the flow of electrical power in the system based on the prioritization mode.