The city stretches along the coast of the Atlantic Ocean, and the city of Porto is only 20 km away. In the 13th century, the city was a fishing port. Since the 14th century, the royal family became interested in the territory and the creation of a monastery on the banks of the Avi River determined the growth of the city.
The Portuguese pilgrimage route to the city of Santiago de Compostela in Galicia Spain runs through the city.