llevaba años

had been … for years

→ llevar
phrase Rare #49,528
had been … for years Used for an action or state that had continued for years up to a point in the past. The words that follow clarify what had been happening or how long someone had been without doing something.
SP: Llevaba años viviendo en Madrid cuando conocí a Ana.
EN: I had been living in Madrid for years when I met Ana.

Anoche, mató al policía que llevaba años buscándola.

Last night, she killed the police officer who had been searching for her for years.

— Tigre y dragón (2000)

Llevaba años trabajando en una novela.

He had been working on a novel for years.

— Anatomía de una caída (2023)

Llevaba años sin entrar aquí.

I hadn't been here for years.

— Los Tenenbaums. Una familia de genios (2001)

Llevaba años trabajando en una novela, antes y después del accidente de Daniel.

I had been working on a novel for years, both before and after Daniel’s accident.

— Anatomía de una caída (2023)

Llevaba años en esta guerra y ya me estaba cansando.

I had been in this war for years and I was getting tired of it.

— Tropa de élite (2007)