We were lead in prayer and the imam prayed 3 rakats instead of four. We sat down and completed our dhikr without noticing then we were told we prayed only 3. We decided to repeat the whole prayer instead of the remaining one rakat was this correct?

Ustadh AbdulAziz al-Haqqan
If the gap was long by custom, repeating the whole prayer was correct. If it was short, the way is to stand and complete the missing rakah, then make sujud al-sahw.