A new method for increasing of the ductility of seismic damaged structures is presented. The method combines efficient and well tested mathematical programming techniques with modern dynamic inelastic design concepts (explicit ductility balance). The results of this method are presented for reinforced concrete frames. The design variables are the longitudinal reinforcement and the cross-sectional dimensions at all member ends. A preliminary design is modified sequentially until the balance of ductility has reached a preselected distribution (optimization level II). Before the structural optimization starts, the actual ground motion is replaced by an equivalent one which contains only a few impulses and produces the same structural damage as the original earthquake (optimization level I). Based on this equivalent earthquake, the optimization problem can be solved and even direct methods for the time-integration of the non-linear dynamic equations can be included.