A control method for grid-interactive inverters to operate in grid-following (GFL) and grid-forming (GFL) modes is presented in this paper. The proposed controller uses two sets of semi-parallel control paths in which each set provides the phase angle and amplitude of the PWM reference signal. Based on the mode of operation of an inverter, the PWM generator receives only one set of reference signals at a time. The proposed controller can keep the two sets of paths synchronized so that when a group of inverters operating in GFL mode is suddenly disconnected from the grid, multiple inverters can seamlessly and simultaneously transit to GFM mode to form a microgrid. The efficacy of the proposed controller has been verified in a microgrid fed by two 5kVA 208V inverters and a 30kVA grid emulator under several scenarios, and the results are presented in this article.