What does the ita serve as in this sentence?

what does the ita serve as in this sentence?

The sentence doesn’t have “いた”. But usually it’s the past form of いる (います). (= “to be” or “exist” for living things)

A very common usage is a verb in the て-Form followed by いる (います) OR いた (いました).
It is similar to the “-ing” form in English.
-ている / -ています (present) is doing.
-ていた / -ていました(past) was doing.

For example:

食べる (たべる) = (to) eat

…を食べていた。was eating …

Sometimes the い is dropped in that form, especially in spoken Japanese it sounds more natural.
…を食べてる。
…を食べてた。
…を食べてます。
…を食べてました。

Here are more examples and explanations: