Is a sentence like 彼がやったんだ past or present tense?


For example, in an a situation like

> 誰がやった？
>
> 彼がやったんだ

Would the latter sentence be considered past or present tense? Is んだ a
combination of の and だ with だ as a copula, or is it a different word
altogether that functions more like other sentence ending particles like
よ,ぞ,な, etc.




Both is past tense. The former is a question the latter is an answer (he did
it).

This topic is similar to this question: [のだから vs のだ (んだから vs
んだ）](https://japanese.stackexchange.com/questions/1870/%E3%81%AE%E3%81%A0%E3%81%8B%E3%82%89-vs-%E3%81%AE%E3%81%A0-%E3%82%93%E3%81%A0%E3%81%8B%E3%82%89-vs-%E3%82%93%E3%81%A0)

