Provided is a preventive and / or therapeutic agent for an immune disease comprising a compound having a BTK inhibitory action or a salt thereof as an active ingredient. An immune disease comprising a compound represented by formula (I) [wherein R1 to R3, W, X, Y, Z and n have the meanings defined in the specification] or a salt thereof as an active ingredient Prophylactic and / or therapeutic agent.BTK阻害作用を有する化合物又はその塩を有効成分として含有する免疫疾患の予防及び/又は治療剤を提供する。 式(I)[式中、R1~R3、W、X、Y、Z及びnは明細書中で定義したとおりの意味を有する]で表される化合物又はその塩を有効成分とする免疫疾患の予防及び又は治療剤。