A compound has retinoid-related orphan receptor γ antagonist activity and shows a therapeutic effect or a preventive effect on autoimmune diseases such as multiple sclerosis or psoriasis or allergic diseases, including allergic dermatitis or the like, such as contact dermatitis or atopic dermatitis. The cyclic amine derivative is represented by the formula or a pharmacologically acceptable salt thereof.