Then the king of Assyria occupied the whole land and attacked Samaria, which he besieged for three years.