and it came to pass after the days of earendur , the seventh king that followed valandil , that the men of westernesse , the dunedain of the north , became divided into petty realms and lordships , and their foes devoured them one by one .