Immediately after depolarization, Na+ channels close and K+ channels open, K+ flows out of the cell, the inside of the cell becomes negative again, the sodium–potassium pump completes the action potential by returning K+ to the inside of the cell and Na+ to the outside, restoring the resting potential