The English past perfect progressive

There is no tense in Spanish that resembles the English past perfect progressive, which expresses continuous actions or situations that began and continued in the past until another past action. But there is a periphrastic verb constructed with the past tense of the verb haber (había, habías, habíamos, habían) + estado (the past participle of the verb estar) + the gerund of the verb that expresses the action or state that resembles the English past perfect progressive.

Valeria había estado viviendo en Estados Unidos 10 años cuando conoció a su actual esposo.