diff --git a/frontend/src/routes/guest/register/steps/register.tsx b/frontend/src/routes/guest/register/steps/register.tsx
index 74f023966e3dc173f44307438fafbba430da553e..c14ad288e8caa80329072a1497d2e33ae8665e3e 100644
--- a/frontend/src/routes/guest/register/steps/register.tsx
+++ b/frontend/src/routes/guest/register/steps/register.tsx
@@ -239,6 +239,13 @@ const GuestRegisterStep = forwardRef(
       if (registerData?.mobilePhoneCountry) {
         setCountryCode(registerData.mobilePhoneCountry)
       }
+
+      if (gender !== '') {
+        // Need to set gender in the state and also in the form. This is
+        // to handle the case where the gender is suggested by the
+        // national ID number
+        setValue('gender', gender)
+      }
     }, [registerData])
 
     register('mobilePhoneCountry')