Grid faults are one of the most severe perturbations in power systems. During these extreme disturbances, the reliability of the grid is compromised and the risk of a power outage is increased. To prevent this issue, distributed generation inverters can help the grid by supporting the grid voltages. Voltage support mainly depends on two constraints: the amount of injected current and the grid impedance. This paper proposes a voltage support control scheme that joins these two features. Hence, the control strategy injects the maximum rated current of the inverter. Thus, the inverter takes advantage of the distributed capacities and operates safely during voltage sags. Also, the controller selects the appropriate power references depending on the resistive-inductive grid impedance. Therefore the grid can be better supported since the voltage at the point of common coupling is improved. Several voltage objectives, which cannot be achieved together, are developed and discussed in detail. These objectives are threefold: a) to maximize the positive sequence voltage, b) to minimize the negative sequence voltage, and c) to maximize the difference between positive and negative sequence voltages. A mathematical optimal solution is obtained for each objective function. This solution is characterized by a safe peak current injection, and by the optimization of the voltage profile in any type of grid connection. Therefore, the proposed control scheme includes advanced features for voltage support during voltage sags, that are applicable to different power facilities in different types of networks. Due to system limitations, a suboptimal solution is also considered, analyzed and discussed for each of the optimization problems. Experimental results are presented to validate the theoretical solutions.