Provided is a heterocyclic compound that can have a PRS inhibitory effect and is expected to be of use as a prophylaxis or a therapeutic agent for PRS-related diseases, including cancer. A compound or a salt thereof, said compound being expressed by formula (I) (wherein the group expressed by (3) indicates a group expressed by formula (II) or formula (III), and the other symbols are as indicated in the specification).L'invention a pour objet de fournir un composé amide hétérocyclique qui peut présenter une action inhibitrice de prolyl-tARN synthétase, et qui peut être mis en œuvre en tant qu'agent de prévention ou de traitement d'affections liées à une prolyl-tARN synthétase dont le cancer. Plus précisément, l'invention concerne un composé représenté par la formule (I) (dans la formule, un groupe représenté par (3) consiste en un groupe représenté par la formule (II) ou la formule (III), les autres symboles sont tels que définis dans la description.) ou un sel de celui-ci.PRS阻害作用を有し得、癌を含むPRS関連疾患等の予防または治療剤として有用であることが期待される複素環アミド化合物を提供すること。下式(I):〔式中、(3)で表される基は、下式(II)または下式(III):で表される基を示し、その他の記号は、明細書に記載の通りである。〕で表される化合物またはその塩。