Allium triquetrum is native to south-western Europe, north-western Africa, Madeira and the Canary Islands, where it grows in meadows, woodland clearings, on river banks and roadside verges from sea level to an elevation of 850 meters .