past tense, polite form (ました form) of the auxiliary verb 居る (iru), expressing location or existence; humble/formal register
Analysis. 居 (i- 'to be/exist') + りました (ri-masu 'polite past'), where り is a euphonic variant of いる before ます
Dictionary entry by Claude.
Lite mode — plain HTML for e-readers and old browsers. Full version