A compound represented by general formula (I): a salt thereof, a solvate thereof, or a prodrug thereof wherein all symbols are as defined in the specification has an antagonistic activity against CXCR4 and is therefore useful as a preventive and/or therapeutic agent for CXCR4-mediated diseases, for example, inflammatory and immune diseases (for example, rheumatoid arthritis, arthritis, retinopathy, macular degeneration, pulmonary fibrosis, transplanted organ rejection, etc.), allergic diseases, infections (for example, human immunodeficiency virus infection, acquired immunodeficiency syndrome, etc.), psychoneurotic diseases, cerebral diseases, cardiovascular disease, metabolic diseases, cancerous diseases (for example, cancer, cancer metastasis, etc.), a preventive and/or therapeutic agent for cancerous diseases or infections, or an agent for regeneration therapy.