Originally the classical copula verb あり(ari, “it is”) following a verb in the 連用形(ren'yōkei, “continuative or stem form”).
The -i ending of the preceding verb stem contracted with the initial a- in ari to form -eri, which was reanalyzed as the 已然形(izenkei, “realis form”, corresponding to the modern hypothetical form) or 命令形(meireikei, “imperative form”) of the verb stem for 四段活用(yodan katsuyō, “quadrigrade conjugation”) verbs, or the 未然形(mizenkei, “irrealis or incomplete form”) for サ変動詞(sa-hen dōshi, “sa-irregular verbs”), all of which ended in -e, with the final -ri then viewed as a suffix.
Research into 上代特殊仮名遣い(jōdai tokushu kanazukai, “ancient special spellings”) clarified the -e vowel value as ⟨e1⟩, showing that the original form could not have been the 已然形(izenkei, “realis form”) that ended in ⟨e2⟩. Ancient ⟨e1⟩ was also known to appear from fusion of -i and a-, and this revealed the much simpler original structure of a verb in the 連用形(ren'yōkei, “continuative or stem form”) for either quadrigrade or sa-irregular verbs + あり(ari).
Originally denoted ongoing state or action, or the resulting state of an action. The sense later shifted to indicate the completion of an action.
This word is classified as 助動詞(jodōshi, “auxiliary verb”) in traditional Japanese grammar. It is morphologically an inflectionalsuffix whose proper shape is -er- (terminal form -eri, -e1r- in Old Japanese) attaching to the stem of some consonant-stem verb classes.