Statics are an effective approach to correct for complex velocity variations in the near surface, but so far, to a large extent, a general and robust automatic static correction method is still lacking. In this paper, we propose a novel two‐phase automatic static correction method, which is capable of handling both primary wave statics (PP statics) and converted‐wave statics (S‐wave statics). Our method is purely data driven, and it aims at maximizing stacking power in the target zone of the stack image. Low‐frequency components of the data are analysed first using an advanced genetic algorithm to estimate seed statics and the time structure for an event of interest, and then the original full‐band data are further aligned via the back‐and‐forth coordinate descent method using the seed statics as initial values and the time structure for event alignment guidance. We apply our new method to two field datasets, i.e., one for 2D PP static correction and the other for 3D S‐wave static correction.