A new nonlinear equalizer for high density magnetic recording channels is presented. It has a structure of the decision-feedback equalizer (DFE) with a nonlinear model at the feedback section and a dynamic threshold detector. The feedback nonlinear model is a sequence of look-up tables (LUTs) indexed by time, and each table is addressed by transition pattern formed by one future and nu past transitions. We call this new nonlinear equalizer the pattern-dependent DFE (PDFE), The feedback nonlinear model cancels the trailing nonlinear intersymbol interference (ISI), and then the data decision is made by considering the precursor nonlinear ISI caused by one future symbol. We propose a tap optimization criterion SNRd for the PDFE which in effect tries to maximize the output signal to noise ratio, and derive a closed-form solution for the tap values. We compare the detection performance of PDFE with that of the DFE and the RAM-DFE on experimental channels; The RAM-DFE is a DFE with one large LUT at its feedback section. The results show that the PDFE yields a significant performance improvement over the DFE and the RAM-DFE, Also the PDFE derived in this paper achieves a superior performance compared with the PDFE derived by the minimum mean-square-error criterion.