This boundary was then extended by a treaty of 3 October 1904 north up to what is now the tripoint with Algeria and then west along the parallel of 27°40'N, this latter line forming the modern Morocco–Western Sahara border; the new Spanish territory thus formed was named Saguia el-Hamra.