This paper presents a novel approach to deal with the synchronization of microgrids to the main grid. It is based on the use of a power electronic device derived from the original concept of the SSSC (Static Synchronous Series Compensator). The proposed scheme considers the connection of this device at the point-of-interconnection (POI) of the microgrid to the low voltage side of the substation transformer (main grid). The voltage originated by the series compensator is fully controlled in both amplitude and phase angle ensuring the conditions for the synchronization. The proposed scheme allows a smooth transition between the islanded operation and the grid connected operation overcoming typical problems observed when conventional methods are applied. Numerical results obtained for a hypothetical microgrid show the effectiveness of the proposed approach.