This paper presents the design of a shunt active filter to compensate reactive power and harmonics in the medium voltage level of a power distribution system. Reconfiguration of the power delivery network imposes new constraints in a distribution substation so that the reactive compensation should be increased. The alternative of shunt active filter compensation connected to the 13.8 kV level is analyzed. Two alternatives are proposed, the first one considers full compensation with the active filter while the second one uses the existing capacitor bank and builds the complementary compensation with the active filter. In the last case, the capacitor bank is modified to make a 5th harmonic filter to avoid system resonances. Both proposals show very good performance.