Provided is a novel and excellent method for treating and/or preventing benign prostatic hyperplasia, prostate cancer, and the like based on selective inhibitory activity against 17²HSD type 5. It was found that an indole or benzimidazole derivative, where a nitrogen atom of the indole ring or benzimidazole ring is substituted with a phenyl group substituted with COOH, has a potent selective inhibitory activity against 17²HSD type 5 and may become an agent for treating and/or an agent for preventing a disease associated with 17²HSD type 5, such as benign prostatic hyperplasia, prostate cancer and the like, without accompanying adverse effects due to a decrease in testosterone; and the present invention has thus been competed.