foi aí que

that's when

→ ser
phrase Uncommon #16,204
that's when Emphasizes the moment when something happened; depending on context, it can also mean “that's where.”
PO: Foi aí que percebi o erro.
EN: That's when I noticed the mistake.

Foi aí que ele me cortou.

That’s when he cut me off.

— Mystic River (2003)

Foi aí que compreendi o que senti no dia em que ele nasceu.

That’s when I understood what I felt on the day he was born.

— Não Conte à Ninguém (2006)

E foi aí que ele a beijou.

And that's when he kissed her.

Depois voltei para casa e foi aí que decidi telefonar-lhe.

Then I went back home, and that’s when I decided to call him.

— Os Imortais (2003)