Breakdown of Hasta hace dos años vivía en Madrid.
en
in / on / by (means of transport) / about (after pensar)
vivir
to live
el año
the year
dos
two
Questions & Answers about Hasta hace dos años vivía en Madrid.
Why do we combine hasta and hace to mean "until two years ago"?
In Spanish, "two years ago" is expressed with the phrase hace dos años (literally, "it makes two years"). To add "until" to this time marker, you simply place hasta directly in front of it. English speakers often try to translate "ago" as a separate word at the end of the phrase, but hasta hace [time] is the standard formula.
Since there is a clear endpoint (until two years ago), why is the imperfect tense vivía used instead of the preterite viví?
Using the preterite viví would be grammatically correct and very common to show the action as a completed, closed block of time. However, using the imperfect vivía here emphasizes the ongoing, continuous nature of living there right up to that cutoff point. It treats living in Madrid as the background situation of the speaker's life before things changed.
Is the subject "I" strictly implied by vivía, or could this mean "he/she lived" in Madrid?
Because vivía is the imperfect conjugation for both "I" (yo) and "he/she/it" (él/ella), it could technically refer to a third person. In real-life conversation, previous context usually makes it clear that the speaker is talking about themselves. If there were any ambiguity, you would simply add the pronoun: hasta hace dos años, yo vivía en Madrid.