This project proposes solar photovoltaic (PV) battery energy storage based microgrid with a multifunctional voltage source converter (VSC) is presented in this article. The maximum power extraction from a PV array, reactive power compensation, harmonics mitigation, balancing of grid currents and seamless transition from grid connected (GC) mode to standalone (SA) mode and vice versa, are performed in this system. Whenever the grid fails, this system operates in SA mode automatically, thereby without causing any interruption in supplying the load. Similarly, it automatically shifts to the GC mode, when the grid is restored. The VSC functions in current control for GC mode, and it operates in voltage control for SA mode of operation. This system is capable of extracting the maximum power from the solar PV array irrespective it is operating in the GC mode or SA mode. The charging and discharging of the battery are controlled by using a bidirectional dc–dc converter. It regulates the dc-link voltage to the maximum power point voltage of the PV array. If the absence of the battery is detected, then the control is automatically shifted to VSC for performing the extraction of the maximum power of the PV array.