The Spanish original is "había de recordar", and "was to remember" is a good translation.
It's meaning is different from just "remembered", as it implies a causality. It wasn't a random remembrance that just happened, it was some memory that was brought by the proximity of death.