Disclosed herein are triazinone compounds of formula I where the substituents are as defined herein or a tautomer or a pharmaceutically acceptable salt of the compound. The compounds have an inhibitory activity on a T-type voltage-dependent calcium channel and are useful particularly for the treatment of pain. Also disclosed are therapeutic agents and medicines comprising the compounds.