This paper presents a control strategy for a threephase four-wire shunt active filter. The shunt active filter is a custom-power device capable to compensate, in real time, harmonics, unbalances and power factor in an electrical installation. In this work the power circuit is based on a three-leg IGBT inverter, with the dc-link composed by two capacitors connected in split. Thus the neutral point is connected directly to the midpoint of the dc-link capacitors. Its control system is composed by an algorithm based on the active and non-active currents together with a synchronizing circuit, and a novel algorithm to keep the voltages of the dc-link capacitors balanced and regulated. Due to the applied power-inverter topology, it is imperative to keep these voltages of the dc-link capacitors balanced in order to avoid malfunctioning of the active filter. To validate the proposed control strategy, simulation and experimental results are presented.