From its origin/spring runs from the southern Iberian plain in a direction east to west, to near the town of Badajoz, where it begins to track south leading to the Gulf of Cádiz. The Guadiana marks the border of Spain and Portugal twice as it runs to the ocean: first, between the River Caia and Ribeira de Cuncos, then later from the River Chança until its mouth. The river is not used to completely mark the boundary between the two states; between the Olivenza ravine and the Táliga ravine, the border still remains a disputed section claimed "de jure" by both countries and administered "de facto" by Spain (as part of the Spanish autonomous community of Extremadura).