Spain has a border with Portugal in the west and borders with France and Andorra in the North. In the south, it borders Gibraltar, a British territory. The Spanish territories of Ceuta and Melilla are in North Africa and border onto Morocco.