The present invention relates to a cosmetic or pharmaceutical composition for treating alopecia, and in general for counteracting excessive hair loss, comprising as an active ingredient a compound of formula (I) R—N1-spermidine, or 1,4-butane-diamine,N-(3-aminopropyl)-N1—R. The compounds of general formula (I) are active in accordance with the objects of the present invention, and also sufficiently stable to allow effective application for topical use on the scalp without potentially being transformed into a different substance, which is no longer active, as a result of oxidation.Buluş, alopesiyi tedavi etmeye ve genel olarak aşırı saç dökülmesi ile mücadele etmeye yönelik farmasötik veya kozmetik bir bileşim ile ilgilidir.