The restored Lê emperors held no real power, and by the time the Mạc dynasty was confined to only a small area in 1592 and finally eradicated in 1677, actual power was in the hands of the Nguyễn lords in the South and the Trịnh lords in the North, both ruling in the name of the Lê emperor while fighting each other.