The expression "HACÍA + period of time + que + verb in the imperfect tense" is used to express a continued action in the past.
For example: "Hacía dos años que estudiaba español." (I had been studying Spanish for two years.)
This construction indicates that the action (studying Spanish) was ongoing in the past for a specified period of time (two years).