To provide a heterocyclic amide compound that has a prolyl-tRNA synthetase (PRS) inhibitory action and is used as a prophylactic or therapeutic agent for PRS associated diseases such as cancer.SOLUTION: The invention provides a compound represented by the formula (I) in the figure or a salt thereof. (Ring A is a substituted/unsubstituted aromatic ring; ring B is a substituted/unsubstituted purine, an imidazopyridine, or a nitrogen-containing 6-membered ring directly coupled with a nitrogen-containing 5-membered ring.)SELECTED DRAWING: None【課題】プロリルtRNA合成酵素(PRS)阻害作用を有し、癌などのPRS関連疾患の予防または治療剤として用いられる複素環アミド化合物の提供。【解決手段】式(I)で表される化合物またはその塩。(環Aは置換/非置換芳香環、環Bは置換/非置換のプリン、イミダゾピリジン又は、含窒素5員環が直結した含窒素6員環)【選択図】なし