A drug for topically administration which is effective as an antiallergic agent. The drug for topically administration contains as an active ingredient an adenine compound represented by the general formula (1): [wherein ring A represents a 6 to 10 membered, mono or bicyclic, aromatic hydrocarbon or a 5 to 10 membered, mono or bicyclic, aromatic heterocycle containing one to three heteroatoms selected among 0 to 2 nitrogen atoms, 0 or 1 oxygen atom, and 0 or 1 sulfur atom n is an integer of 0 to 2 m is an integer of 0 to 2 R represents halogeno, (un)substituted alkyl, etc. X1 represents oxygen, sulfur, NR1 (R1 represents hydrogen or alkyl), or a single bond Y1 represents a single bond, alkylene etc. Y2 represents a single bond, alkylene, etc. Z represents alkylene and at least one of Q1 and Q2 represents -COOR10 (wherein R10 represents (un)substituted alkyl, etc.), etc.] or a pharmaceutically acceptable salt of the compound.