The present invention relates to an amide derivative of the formula (1), having a C5a receptor antagonistic actionwherein each symbol is as defined in the specification.The above-mentioned amide derivative, an optically active form thereof and a pharmaceutically acceptable salt thereof are promising as an agent for the treatment or prophylaxis of diseases or syndromes caused by inflammation caused by C5a [e.g., autoimmune diseases such as rheumatism, systemic lupus erythematosus and the like, sepsis, adult respiratory distress syndrome, chronic obstructive pulmonary disease, allergic diseases such as asthma and the like, atherosclerosis, cardiac infarction, brain infarction, psoriasis, Alzheimer's disease and serious organ injury (e.g., pneumonia, nephritis, hepatitis and pancreatitis and the like) due to activation of leukocytes caused by ischemia reperfusion, trauma, burn, surgical invasion and the like]. Moreover, they are useful as a therapeutic or prophylactic agent for the infectious diseases caused by bacteria and virus that invade via a C5a receptor.