Why would a '95 Nissan Pathfinder jerk when accelerating?

I had a very similar problem with my 1996 Nissan truck. New plugs, wires, distributor and rotor only partly solved the problem. Then I replaced the O2 sensor and the probelm disappeared completely. Had 130K miles on the truck when replaced and the O2 sensor was shot.