Spain's military will help secure the border as more migrants try to reach the territory by sea, with nine people confirmed dead.