The diet of otters was studied in closely associated freshwater, brackish and marine habitats, from spraints collected on the Portuguese south-west coast over an 18-month period. In areas where marine prey was the only available resource, diet was dominated by blennies, wrasses and gobies, but other prey was taken in areas near coastal lagoons, marshes and estuaries. Eels and amphibians were considered the typical prey of freshwater habitats, and grey mullet the typical prey of brackish water habitats. If the inland habitats near the coast were large enough, otters preferred to forage there rather than in the sea. In one area where otters alternatively used marine and inland habitats, the former were used most extensively in autumn and winter, and the latter in spring and summer. It is suggested that otters prefer to forage inland rather than in the sea.